-
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
Type argument inference does not take call's contextual type into account #10245
Comments
What's happening here is that the call to A workaround would be to give function map(array: number[]) {
return array.map<[number, number]>(x => [x, x * x]);
} |
@DanielRosenwasser Here some other examples:
` |
@whiteblackkeys Unrelated. Root cause is #241 - function return expression widening causes the object literal freshness to be lost, causing excess properties to not be checked. |
Fixed by #29478. |
TypeScript Version: 2.0.0
Code
Expected behavior:
no error
Actual behavior:
The text was updated successfully, but these errors were encountered: