Skip to content

Function: castValueAsString() ​

ts
function castValueAsString(value: unknown): string;

Casts an unknown value to a string

Parameters ​

ParameterTypeDescription
valueunknownThe value to cast

Returns ​

string

The value as a string

Throws ​

E_UNCASTABLE when the value cannot be cast to a string