Closed ajafff closed 5 years ago
declare let tuple: [number, string]; const arrified = arrify(tuple); arrified.push(1); arrified[0] = 'foo'
Since tuples are arrays, they are returned as is. The type declarations however widen the type to a regular (mutable) array type. Both mutations above should not be allowed.
Any suggestions on how to fix this?
Since tuples are arrays, they are returned as is. The type declarations however widen the type to a regular (mutable) array type. Both mutations above should not be allowed.