Skip to content

Function: compact()

ts
function compact<T>(obj): Partial<T>;

Defined in: helpers.ts:34

Removes null and undefined values from an object, returning a partial copy.

Type Parameters

Type Parameter
T extends Record<string, unknown>

Parameters

ParameterType
objT

Returns

Partial<T>