18. implement TupleToUnion<T>
分享给更多人
-通过 / -执行
Given a tuple type, implement TupleToUnion<T>
to get a union type from it.
type Foo = [string, number, boolean]type Bar = TupleToUnion<Foo> // string | number | boolean
-通过 / -执行
Given a tuple type, implement TupleToUnion<T>
to get a union type from it.
type Foo = [string, number, boolean]type Bar = TupleToUnion<Foo> // string | number | boolean