You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Type [number,number] is not recognized correctly #12579
Tuple types are only inferred in the presence of a contextual type. e.g. let a: Data = [1, 2]. the issue here is that the contextual type does not flow through map, since the return type position is not a generic argument inference site. issue #11152 is tracking fixing that.
Activity
aluanhaddad commentedon Nov 30, 2016
Error message is a bit off putting but I think the behavior is right.
You can add this to make it work
k8w commentedon Nov 30, 2016
Shouldn't
v=>[v, v+1]be recognized as[number, number]instead ofnumber[][]?mhegazy commentedon Nov 30, 2016
Tuple types are only inferred in the presence of a contextual type. e.g.
let a: Data = [1, 2]. the issue here is that the contextual type does not flow throughmap, since the return type position is not a generic argument inference site. issue #11152 is tracking fixing that.mhegazy commentedon Nov 30, 2016
closing in favor of #11152