@sinclair/typebox
Version:
Json Schema Type Builder with Static Type Resolution for TypeScript
30 lines (29 loc) • 814 B
TypeScript
import { Kind, Hint, ReadonlyKind, OptionalKind } from '../symbols/index';
export interface SchemaOptions {
$schema?: string;
/** Id for this schema */
$id?: string;
/** Title of this schema */
title?: string;
/** Description of this schema */
description?: string;
/** Default value for this schema */
default?: any;
/** Example values matching this schema */
examples?: any;
/** Optional annotation for readOnly */
readOnly?: boolean;
/** Optional annotation for writeOnly */
writeOnly?: boolean;
[ ]: any;
}
export interface TKind {
[ ]: string;
}
export interface TSchema extends TKind, SchemaOptions {
[ ]?: string;
[ ]?: string;
[ ]?: string;
params: unknown[];
static: unknown;
}