-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
“T[][] is not assignable to Iterable<[T, T]>” while it is (at compile time) #7799
Comments
I think this issue is related to #6574 |
Thanks, yes, same problem, a dupe. Should I close this one? |
It would be nice if contextual types allowed to infer an array as a tuple, to support such an idiom. @FranklinWhale I don't think #6574 is related. If #6574 was fixed, the inferred type would be |
#6574 is about inferring Hence my point that they're not related. |
That's not really the case. In @elbarzil's code sample in #6574, |
See also #3369 |
TypeScript Version:
1.8.9
Code
Expected behavior: types are inferred correctly, no error shown.
Actual behavior: type error.
The text was updated successfully, but these errors were encountered: