typelab / utils / UnionToTuple
type UnionToTuple<T> = _UnionToTuple<T, UnionLast<T>>;Converts a union type to a Tuple.
| Type Parameter | Description |
|---|---|
|
|
The union type. |
A Tuple containing all the types in the union.
// ['a', 'b', 'c']
type Tupl = UnionToTuple<'a' | 'b' | 'c'>;