Closed
Description
TypeScript Version: 2.1.4
Code
interface Bar extends Promise<void> {
foo(): this;
// also repros with `foo(): Bar;`
}
const buggy = async (param: Bar) => {
await param.foo();
};
Expected behavior:
In TypeScript 2.0.3 this code will compile successfully.
Actual behavior:
In TypeScript 2.1.4 this code will not compile successfully and gives the error error TS1058: Operand for 'await' does not have a valid callable 'then' member.