UNPKG

tap

Version:

A Test-Anything-Protocol library for JavaScript

18 lines (14 loc) 329 B
/** Create a type from an object type without certain keys. @example ``` import {Omit} from 'type-fest'; type Foo = { a: number; b: string; }; type FooWithoutA = Omit<Foo, 'a'>; //=> {b: string}; ``` */ export type Omit<ObjectType, KeysType extends keyof ObjectType> = Pick<ObjectType, Exclude<keyof ObjectType, KeysType>>;