Skip to content

Latest commit

 

History

History
 
 

01097-medium-isunion

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

IsUnion medium #union

by null @bencor

Take the Challenge    한국어

Implement a type IsUnion, which takes an input type T and returns whether T resolves to a union type.

For example:

type case1 = IsUnion<string> // false
type case2 = IsUnion<string | number> // true
type case3 = IsUnion<[string | number]> // false

Back Share your Solutions Check out Solutions

Related Challenges

1042・IsNever 223・IsAny 4484・IsTuple