types-kit.strictexclude.md

September 4, 2023 ยท View on GitHub

Home > types-kit > StrictExclude

StrictExclude type

Strict version of Exclude.

Signature:

export type StrictExclude<T, U extends T> = Exclude<T, U>

Example

type Foo = 'a' | 'b' | 'c'
// Expect: 'b' | 'c'
type Bar = StrictExclude<Foo, 'a'>

Contents

  1. 1StrictExclude type
  2. 2Example