ensureGenericObject<T>
Ensures that a value is a generic object, returning it with narrowed type.
Import:
import { ensureGenericObject } from 'obsidian-dev-utils/type-guards';Signature:
function ensureGenericObject(obj: T): GenericObject<T>Parameters:
| Parameter | Type | Description |
|---|---|---|
obj | T | The value to ensure. |
Returns: GenericObject<T> — The value as a generic object.