-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Bad type inference of function overloads #20396
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
Comments
Please see #20257 |
I don't think this issue a duplicate of #20257. While the underlying limitation might be the same, in #20257 there is no definite clue which overload is the expected one. In this issue, however, proper inference can be made following the types of the parameters. What we know: trie.data: T[]
expected mapper parameter: (x: T) => <some B>
provided mapper argument: ((x: T) => U) & ((x: Trie<T>) => Trie<U>) We are looking for a
The first option yields the correct solution |
Automatically closing this issue for housekeeping purposes. The issue labels indicate that it is unactionable at the moment or has already been addressed. |
@mhegazy Does my last comment change your view on this issue? |
do not think so.. |
TypeScript Version: 2.7.0-dev.20171110
Code
The text was updated successfully, but these errors were encountered: