-
Notifications
You must be signed in to change notification settings - Fork 13k
Closed
Labels
Working as IntendedThe behavior described is the intended behavior; this is not a bugThe behavior described is the intended behavior; this is not a bug
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
alinck-its, 0az, noinkling, btoo and victorgarciaesgi
Metadata
Metadata
Assignees
Labels
Working as IntendedThe behavior described is the intended behavior; this is not a bugThe behavior described is the intended behavior; this is not a bug