When Start is 0 and no End is provided the output should be identical to the input, but for a union of tuples this doesn't work when they are of different lengths:
type X = ArraySlice<['a'] | ['b', 'c'], 0>;
// ^? type X = ['a' | 'b'];
This doesn't repro when Start is not provided or provided as never:
type X = ArraySlice<['a'] | ['b', 'c']>;
// ^? type X = ['a'] | ['b', 'c'];
type Y = ArraySlice<['a'] | ['b', 'c'], never>;
// ^? type Y = ['a'] | ['b', 'c'];
Bug description
When Start is 0 and no End is provided the output should be identical to the input, but for a union of tuples this doesn't work when they are of different lengths:
This doesn't repro when Start is not provided or provided as
never
:Repro
https://www.typescriptlang.org/play/?#code/JYWwDg9gTgLgBDAnmApnA3nAglKBDRAZQBtgBjNAXzgDMoIQ4AiJVAWhpQGcYmBuALAAoYazQANAIxwAvNlwES5FAB4A2gHI8GgLpwAPnE0AjDQBo4GsrosAGAHyChAemdx3APQD8w0cgkATLLy+ESkFOpaugZGGqYWVrqOwq7ucN6+QmJw4gDMwTihShGa2nqGJuaW1joWAHYoAG4oUMkubp4+It1AA
Upvote & Fund