Closed
Description
Bug Report
π Version & Regression Information
ts stable & nightly
β― Playground Link
π» Code
// The last comes first
type T1 = [1][any]; // 1
type T2 = [1, 2][any]; // 2 | 1
type T3 = [1, 2, 3][any]; // 3 | 1 | 2
type T4 = [1, 2, 3, 4][any]; // 4 | 1 | 2 | 3
type T5 = [1, 2, 3, 4, 5][any]; // 5 | 1 | 2 | 3 | 4
π Actual behavior
In this snippet, a Tuple's last member always comes first in unions between its values
π Expected behavior
type T2 = [1, 2, 3][any]; // 1 | 2 | 3
Metadata
Metadata
Assignees
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
MartinJohns commentedon Jul 22, 2021
Essentially a duplicate of #17944.
typescript-bot commentedon Jul 24, 2021
This issue has been marked as a 'Duplicate' and has seen no recent activity. It has been automatically closed for house-keeping purposes.