In typescript, an array can be converted to tuple by
type Arr = any[]; const f = < T extends Arr > (...args: [...T]): [...T] => { return args; } c