Skip to content

Latest commit

 

History

History
17 lines (12 loc) · 1.49 KB

File metadata and controls

17 lines (12 loc) · 1.49 KB

IsNever medium #union #utils

by hiroya iizuka @hiroyaiizuka

Take the Challenge

Implement a type IsNever, which takes input type T. If the type of resolves to never, return true, otherwise false.

For example:

type A = IsNever<never>  // expected to be true
type B = IsNever<undefined> // expected to be false
type C = IsNever<null> // expected to be false
type D = IsNever<[]> // expected to be false
type E = IsNever<number> // expected to be false

Back Share your Solutions Check out Solutions