Last updated 2 years ago
Undefined<Type>
A generic type Undefined indicates generic type variable Type as undefined. It takes generic type variable Type causing other types than undefined its change to never.
Undefined
Type
undefined
never
type Undefined<Type> = Type extends undefined ? Type : never;
Generic type variable that cannot be different than undefined.