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