@sinclair/typebox
Version:
Json Schema Type Builder with Static Type Resolution for TypeScript
10 lines (9 loc) • 409 B
text/typescript
import type { TSchema, SchemaOptions } from '../schema/index.mjs';
import { Kind } from '../symbols/index.mjs';
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>;