Skip to main content

Exclude

type Exclude<T, U> = T extends U ? never : T;

Exclude from T those types that are assignable to U

Type Parameters

Type Parameter
T
U