removeUndefinedProperties<Type>
Removes all undefined properties from an object.
Import:
import { removeUndefinedProperties } from '@mnaoumov/typescript-lib/object-utils';Signature:
function removeUndefinedProperties($object: Type, keysToKeep: readonly string[] | undefined): TypeParameters:
| Parameter | Type | Description |
|---|---|---|
$object |
Type | |
keysToKeep |
readonly string[] | undefined | The keys to keep. |
Returns: Type — The object with all undefined properties removed.