Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/typebox_deno/src/value/convert.ts>Convert

JSON Schema Type Builder with Static Type Resolution for TypeScript
Latest
function Convert
import { Convert } from "https://deno.land/x/typebox_deno@0.31.22/src/value/convert.ts";

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 possible.

Type Parameters

T extends Types.TSchema

Parameters

schema: T
value: unknown

Returns

unknown