Type alias SubtractSubset<B, A>

SubtractSubset<B, A>: Pick<A, Exclude<keyof A, keyof B>>

subtract an interface subset B from its superset A.

Type Parameters

  • B

    the subset type

  • A extends B

    th superset type

Example

type C = SubtractSubset<{ a: number, c?: symbol }, { a: number, b: string, c: symbol }>
// type C == { b: string }

Generated using TypeDoc