Deviopath › TypeScript

Omit Properties

Medium · Utility Types

Write omit<T extends object, K extends keyof T>(obj: T, keys: K[]): Omit<T, K> that returns a new object without the listed keys.

Do not change the original object. Omit<T, K> is the opposite of Pick<T, K>.

Next: Pluck with keyof