Skip to content

Function: omit()

ts
function omit<T, U>(obj: T, exclude: U[]): Omit<T, U>;

Type Parameters

Type Parameter
T extends object
U extends string

Parameters

ParameterTypeDescription
objTThe source object
excludeU[]-

Returns

Omit<T, U>

A new object without the specified keys