Function: omitKeysFromObject()
omitKeysFromObject<
Object
,ObjectKeys
>(source
:Object
, ...keys
: readonlyObjectKeys
[]):Omit
<Object
,ObjectKeys
>
Clones the source object using deepClone then deletes the specified keys with Reflect.deleteProperty
Type Parameters
Type Parameter | Description |
---|---|
Object extends object | The object type. |
ObjectKeys extends string | number | symbol | The keys of the object type. |
Parameters
Parameter | Type | Description |
---|---|---|
source | Object | The input object. |
...keys | readonly ObjectKeys [] | The keys to omit from the object. |
Returns
Omit
<Object
, ObjectKeys
>
A new object without the specified keys.