-
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
Generic with extends and return will fail compilation #17794
Comments
Not reproducible in the playground. |
@ahejlsberg then maybe I am looking at this The documentation does not make any other mention of this? https://www.typescriptlang.org/docs/handbook/generics.html Is it possible in 2.4? |
Automatically closing this issue for housekeeping purposes. The issue labels indicate that it is unactionable at the moment or has already been addressed. |
@mhegazy could you kindly let me know if there is such a thing as I asked in the previous comment? |
no. this is flagged as error in 2.4 + |
TypeScript Version: 2.4.2
It fails with this
Argument of type 'A' is not assignable to parameter of type 'T | PromiseLike'.
Type 'A' is not assignable to type 'PromiseLike'.
Property 'then' is missing in type 'A'.
This code compiled just fine in 2.3
It looks similar to this old bug which compiled fine with 2.3, but fails with 2.4
#13993
The text was updated successfully, but these errors were encountered: