Never

Never<Not, Type>

A generic type Never indicates the generic type variable Type is never of the generic type variable Not. It takes generic type variable Type constrained by a generic type variable Not which constraint causes its change to never.

never.type.ts
type Never<Not, Type> = Type extends Not ? never : Type;

Generic type variables

Not

A generic type variable Not constrain the generic type variable Type causing the Type change to never.

Type

A generic type variable Type constrained by generic type variable Not is never Not.

Last updated