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
This is because a tuple of length n is an anonymous type that has properties 0, ... n - 1, and which effectively extends an array of the union of all element types. Since it's a subtype of Array, it gets an index signature, whose output type is the union of all element types.
Activity
saschanaz commentedon Dec 23, 2015
It seems it needs more discussion. See also #5203.
DanielRosenwasser commentedon Dec 23, 2015
This is because a tuple of length
nis an anonymous type that has properties0, ...n - 1, and which effectively extends an array of the union of all element types. Since it's a subtype ofArray, it gets an index signature, whose output type is the union of all element types.