I want to specify how the rest of the array should look without knowing how many values the array will have. How can I achieve something like this? (playground version here):
type numStrArr = [number, ...string];
let arr: numStrArr = [1, 'hi', 'other string'];
The above code throws the error Type expected. at the spread operator, however.
I'm aware that there was a proposal for this, but how can I achieve similar behavior now?