タプル(固定長の配列)からユニオン型を作り出す
code:memo.ts
type Suit1 = typeof suits1number; // ^? "spade" | "heart" | "diamond" | "club"
type Suit2 = typeof suits2number; // ^? "spade" | "heart"
code:memo.ts
type TupleToUnion<T extends unknown[]> = Tnumber; const a: TupleToUnion<Arr>; // expected to be '1' | '2' | '3'