9. implement NonNullable<T>
Share
- accepted / - tried
NonNullable<T> returns a type by excluding null and undefined from T.
Please implement MyNonNullable<T> by yourself.
type Foo = 'a' | 'b' | null | undefinedtype A = MyNonNullable<Foo> // 'a' | 'b'