Skip to content

Instantly share code, notes, and snippets.

@thomasboyt
Created November 16, 2016 05:44
Show Gist options
  • Save thomasboyt/974943b5a255c22ae027520509056592 to your computer and use it in GitHub Desktop.
Save thomasboyt/974943b5a255c22ae027520509056592 to your computer and use it in GitHub Desktop.
interface PromiseExtender extends Promise<any> {
}
function bar(): PromiseExtender {
return new Promise((resolve, reject) => {});
}
async function foo() {
await bar(); // raises error: "Operand for 'await' does not have a valid callable 'then' member."
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment