-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Closed as not planned
Labels
Design LimitationConstraints of the existing architecture prevent this from being fixedConstraints of the existing architecture prevent this from being fixed
Description
π Search Terms
π Version & Regression Information
Unknown
β― Playground Link
π» Code
const PAIRS = [
['a', 0],
['b', 1],
['c', 2],
] as const;
const CONCATENATED = PAIRS.map(value => `${value[0]}-${value[1]}` as const);
type Concatenated = (typeof CONCATENATED)[number];
π Actual behavior
If you hover over Concatenated
, you can see that its type is type Concatenated = "a-0" | "a-2" | "a-1" | "b-0" | "b-2" | "b-1" | "c-0" | "c-2" | "c-1"
.
π Expected behavior
The expected type should instead be type Concatenated = "a-0" | "b-1" | "c-2"
.
Additional information about the issue
No response
uhyo
Metadata
Metadata
Assignees
Labels
Design LimitationConstraints of the existing architecture prevent this from being fixedConstraints of the existing architecture prevent this from being fixed