-
Notifications
You must be signed in to change notification settings - Fork 12.5k
New issue
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
Regression: TypeScript no longer awaits custom Promises #8423
Comments
Please see #6068 for more details. |
@mhegazy Doesn't look like a duplicate - that issue seems to be describing setting global |
sorry about that. indeed the wrong reference. |
but i do not get an error for this locally. looks like there is something else going on.. can you share more code? |
Well, I limited to this minimal example and I'm certainly seeing this error. Perhaps something in the config, let me try without one. |
Okay, this seems to be happening only when |
@mhegazy Please let me know if any other details are needed for this bug. |
I can repro this. |
While you're at it, could you also make that error list exactly how the |
@mhegazy Thank you! Fast as always, it's a pleasure to be beta-tester :) |
For this specific check, it actually passed. First we try to get the promised type from the the issue was a bit earlier than this specif check, during getting the promised type; now that undefined is added to optional arguments by default, we try to get the signature of a union type of first arg in all overloads and it fails as undefined does not have any signatures. |
Thanks @RReverser! we do appreciate you feedback, keep the reports coming. |
Fix #8423: Remove undefined while getting the type of the first argument of then signature
TypeScript Version:
1.9.0-dev.20160502
Code
Expected behavior:
No error, as this is an await-compatible Promise definition; more concretely, those are definitions for UWP APIs and they worked well with a stable TypeScript.
Actual behavior:
Compiler emits an error
Operand for 'await' does not have a valid callable 'then' member.
.The text was updated successfully, but these errors were encountered: