Exclude

Easy
built-in
infer
conditional types
distributive conditional types

Description:

Implement the built-in Exclude<T, U>

Exclude from T those types that are assignable to U

For example:

MyExclude<'a' | 'b' | 'c', 'a'> // expected: 'b' | 'c'

Code

Loading...