TypeScript Version: 2.1.4
Code
interfaceHelloPromiseextendsPromise<string>{}functionhello() : HelloPromise{returnPromise.resolve('hello');}asyncfunctionrun(){awaithello();};run();Expected behavior: The code is compiled without errors.
Actual behavior: Following error is reported:
tsc -t es6 --strictNullChecks index.ts
index.ts(8,3): error TS1058: Operand for 'await' does not have a valid callable 'then' member.
You can find the repro code here:
https://github.com/jsedlacek/ts-promise-repro
TypeScript Version: 2.1.4
Code
Expected behavior: The code is compiled without errors.
Actual behavior: Following error is reported:
You can find the repro code here:
https://github.com/jsedlacek/ts-promise-repro