castTo<T>
Casts a value to a specific type.
Import:
import { castTo } from '@mnaoumov/typescript-lib/object-utils';Signature:
function castTo(value: unknown): TParameters:
| Parameter | Type | Description |
|---|---|---|
value |
unknown | The value to cast. |
Returns: T — The value as the specified type.