If we have a specific type defined as:
type Tuple = [name: string, age: number, address: string];
and we are interested in creating a new type without the first element, like this:
type NewTuple = [age: number, address: string];
Is there a way to achieve this using some kind of "destructuring" for types?
type [Name, ...NewTuple] = Tuple;
In this scenario,
// Name === string
// NewTuple === [age: number, address: string]
Update:
I am aware that the following approach works but I believe there might be a more elegant solution, right?
type NewTuple = [Tuple[1], Tuple[2]]