Skip to content

Latest commit

 

History

History
23 lines (14 loc) · 510 Bytes

File metadata and controls

23 lines (14 loc) · 510 Bytes

Home > types-kit > Diff

Diff type

Set difference of union and intersection of given union types A and B.

Signature:

export type Diff<A, B> = StrictExclude<A | B, A & B>

References: StrictExclude

Example

// Expect: '2' | '3'
type Foo = Diff<'1' | '2', '1' | '3'>