UNPKG

typebox-schema-faker

Version:

Generate fake data from TypeBox schemas for testing, prototyping and development.

9 lines (8 loc) 465 B
import { type TSchema, type TReadonly, type TOptional, type TRecursive } from '@sinclair/typebox'; /** * Removes wrapper types from a schema to access the inner type */ export declare function unwrap<T extends TSchema>(schema: TReadonly<T>): T; export declare function unwrap<T extends TSchema>(schema: TOptional<T>): T; export declare function unwrap<T extends TSchema>(schema: TRecursive<T>): T; export declare function unwrap<T extends TSchema>(schema: T): T;