NotUndefined

NotUndefined<Type>

A generic type NotUndefined represents any type instead of undefinedarrow-up-right. It takes generic type variable Type constrained by undefinedarrow-up-right which constraint causes its change to neverarrow-up-right.

not-undefined.type.ts
type NotUndefined<Type> = Type extends undefined ? never : Type;

Generic type variables

Type

A generic type Type that is never undefinedarrow-up-right.

Last updated