-
Notifications
You must be signed in to change notification settings - Fork 13k
Closed
Labels
FixedA PR has been merged for this issueA PR has been merged for this issue
Milestone
Description
TypeScript Version: 2.1.4
Code
interface HelloPromise extends Promise<string> {}
function hello() : HelloPromise {
return Promise.resolve('hello');
}
async function run() {
await hello();
};
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
Metadata
Metadata
Assignees
Labels
FixedA PR has been merged for this issueA PR has been merged for this issue