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
typeT0=[...[bar: string]]// = [bar: string]typeT1=[foo: string, ...[bar: string]]// Error : Tuple members must all have names or all not have names. (5084)
The text was updated successfully, but these errors were encountered:
This is by design. Is a bit confusing but what's happening is that type T1 = [foo: string, ...[bar: string]] is an invalid syntax. Instead can label it and fix it by changing it as:
type T1 = [foo: string, ...args: [bar: string]]
There has been a design discussion some time ago about this. You can check more details here: #43744
TS stable and nightly
Playground Link
The text was updated successfully, but these errors were encountered: