Skip to content

Latest commit

 

History

History
13 lines (8 loc) · 1.65 KB

File metadata and controls

13 lines (8 loc) · 1.65 KB

Tuple to Union medium #infer #tuple #union

by Anthony Fu @antfu

Take the Challenge    简体中文 日本語

Implement a generic TupleToUnion<T> which covers the values of a tuple to its values union.

For example

type Arr = ['1', '2', '3']

type Test = TupleToUnion<Arr> // expected to be '1' | '2' | '3'

Back Share your Solutions Check out Solutions