Closed as not planned
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