Closed
Description
Let's say i define a tuple type like this :
type MyTuple = [number, number]
Now when i do this:
let a: MyTuple = [1, 2]
let b: MyTuple = a.slice();
The compiler complains that TS2322: Type 'number[]' is not assignable to type '[number, number]'. Property '0' is missing in type 'number[]'.
I think it should work, slice without argument (or slice(0) or even slice(0,2)) should allow to clone a tuple.