Skip to content

castTo<T>

Casts a value to a specific type.

Import:

import { castTo } from '@mnaoumov/typescript-lib/object-utils';

Signature:

function castTo(value: unknown): T

Parameters:

Parameter Type Description
value unknown The value to cast.

Returns: T — The value as the specified type.