Closed
Description
Not sure this actually should be possible... I guess it would get funky as typescript would have to deal with naming conflicts.
TypeScript Version: 4.1.0-dev
Search Terms:
Variadic, Named Tuples
Code
type Append<I, T extends unknown[]> = [...T, last:I];
type FooBar = Append<string, [foo: number, bar: boolean]>
Expected behavior:
Should preserve named tuples labels:
type FooBar = [foo: number, bar: boolean, last: string]
Actual behavior:
type FooBar = [number, boolean, string]
Related Issues:
none