Skip to content

omitKeys

omitKeys<T, K>(keysToOmit, obj): Omit<T, K>

Defined in: utils/object.ts:21

Omits the specified keys from an object and returns a new object without those keys.

Type Parameters

T extends object

The type of the original object.

K extends string | number | symbol

The keys to omit from the original object.

Parameters

keysToOmit

K[]

The keys to omit from the original object.

obj

Partial<T>

The original object.

Returns

Omit<T, K>

A new object without the omitted keys.