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
Tuple suffix associated with rest element in a binding pattern #2714
Right now, a is string, but b is (string | number)[]. This is because the type associated with b is the array of the element type of the incoming array.
But it would be really nice if b was [number], or at least number[]. You should be able to chop off the rest of the elements in the incoming array, and only use those for the type associated with a rest element.
Activity
RyanCavanaugh commentedon May 19, 2015
The idea as I understand it is that any spread operator assumes that "all of the rest of the values" are in the domain of the tuple-specified types.
e.g.