Create a copy of a provided object with the provided keys omitted. This is an implementation of the Omit<T, K> type in TypeScript.
Omit<T, K>
Time complexity: O(n)
Space complexity: O(n)
The object you are renaming a key of
The keys to remove from the object
A new object containing the entries that were not omitted
Object
const object = { a: 1, b: 2, c: 3 };omit(object, ['c']); // { a: 1, b: 2 } Copy
const object = { a: 1, b: 2, c: 3 };omit(object, ['c']); // { a: 1, b: 2 }
Create a copy of a provided object with the provided keys omitted. This is an implementation of the
Omit<T, K>
type in TypeScript.Time complexity: O(n)
Space complexity: O(n)