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
Leading Rest element in tuples are kinda broken !?Β #61842
typeT=[...string[],number,boolean,symbol];typeFirst=T[0];// ^? First = string | number | boolean | symbol
π Expected behavior
typeT=[...string[],number,boolean,symbol];typeFirst=T[0];// ^? First = string | number
Additional information about the issue
Is this a common thing it doesn't make sense, like T[0] can never be boolean or symbol am I missing something.
Although I can be used to create type guard to check for leading rest element in arrays.
Activity
MartinJohns commentedon Jun 10, 2025
Duplicate of #56885.
benzaria commentedon Jun 10, 2025
True !