We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeScript Version: 2.5.2
Code
class Test { public async test(): Promise<void> { await test2(); } public test2(): boolean { console.info('test2'); return true; } }
Expected behavior: Compiler warning or error that test2() is not awaitable because it does not return a Promise.
test2()
Promise
Actual behavior: No warning or error, compiles unnecessarily into an awaiter wrapped function.
The text was updated successfully, but these errors were encountered:
Did you mean await this.test2();?
await this.test2();
Even still, duplicate of #8310.
Search is your friend.
Sorry, something went wrong.
Did a search but guess I just included open issues.
Nevertheless, thanks! As this is intended for the reasons meantioned in #8310 I look into linting to avoid this error.
No branches or pull requests
TypeScript Version: 2.5.2
Code
Expected behavior:
Compiler warning or error that
test2()
is not awaitable because it does not return aPromise
.Actual behavior:
No warning or error, compiles unnecessarily into an awaiter wrapped function.
The text was updated successfully, but these errors were encountered: