@scalar/typebox
Version:
Json Schema Type Builder with Static Type Resolution for TypeScript
7 lines (6 loc) • 520 B
text/typescript
import type { TSchema } from '../../type/schema/index.mjs';
import type { StaticDecode } from '../../type/static/index.mjs';
/** Decodes a value or throws if error */
export declare function Decode<T extends TSchema, Static = StaticDecode<T>, Result extends Static = Static>(schema: T, references: TSchema[], value: unknown): Result;
/** Decodes a value or throws if error */
export declare function Decode<T extends TSchema, Static = StaticDecode<T>, Result extends Static = Static>(schema: T, value: unknown): Result;