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

x/typebox_deno/src/value/value.ts>Value.Decode

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

Decodes a value or throws if error

Type Parameters

T extends Types.TSchema
optional
D = Types.StaticDecode<T>

Parameters

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

Decodes a value or throws if error

Type Parameters

T extends Types.TSchema
optional
D = Types.StaticDecode<T>

Parameters

schema: T
value: unknown