Skip to main content
Deno 2 is finally here 🎉️
Learn more
Go to Latest
function Value.Convert
import { Value } from "https://deno.land/x/openbox@1.1.8/deps.ts";
const { Convert } = Value;

Converts any type mismatched values to their target type if a reasonable conversion is possible

Type Parameters

T extends Types.TSchema

Parameters

schema: T
references: Types.TSchema[]
value: unknown

Returns

unknown

Converts any type mismatched values to their target type if a reasonable conversion is possibl.

Type Parameters

T extends Types.TSchema

Parameters

schema: T
value: unknown

Returns

unknown