Skip to content

castTo<T>

Casts a value to a specific type.

Import:

import { castTo } from 'obsidian-dev-utils/object-utils';

Signature:

function castTo(value: unknown): T

Parameters:

ParameterTypeDescription
valueunknownThe value to cast.

Returns: T — The value as the specified type.