Skip to content

Latest commit

 

History

History
29 lines (19 loc) · 576 Bytes

File metadata and controls

29 lines (19 loc) · 576 Bytes

Home > types-kit > DiffPick

DiffPick type

From T remove properties that exist in U.

Signature:

export type DiffPick<T, U> = Pick<T, Exclude<Keys<T>, Keys<U>>>

References: Keys

Example

interface Props {
   a: number
   b: number
   c: number
}

// Expect: { b: number, c: number }
type NewProps = DiffPick<Props, { a: number }>