UNPKG

@sinclair/typebox

Version:

Json Schema Type Builder with Static Type Resolution for TypeScript

10 lines (9 loc) 401 B
import type { TSchema, SchemaOptions } from '../schema/index'; import { Kind } from '../symbols/index'; export interface TRef<Ref extends string = string> extends TSchema { [Kind]: 'Ref'; static: unknown; $ref: Ref; } /** `[Json]` Creates a Ref type. The referenced type must contain a $id */ export declare function Ref<Ref extends string>($ref: Ref, options?: SchemaOptions): TRef<Ref>;