mirror of
https://github.com/type-challenges/type-challenges.git
synced 2025-12-08 19:06:13 +00:00
1.4 KiB
1.4 KiB
Tuple to Union

by Anthony Fu @antfu
Implement a generic TupleToUnion<T> which covers the values of a tuple to its values union.
For example
type Arr = ['1', '2', '3']
const a: TupleToUnion<Arr> // expected to be '1' | '2' | '3'