Skip to content

StrictExclude

StrictExclude<T, U> = Exclude<T, U>

Defined in: src/types/utilities.ts:62

Strict exclude that shows what was excluded

Type Parameters

T

T

U

U extends T

Example

type Colors = 'red' | 'blue' | 'green'
type WarmColors = StrictExclude<Colors, 'blue'> // 'red' | 'green'