UNPKG

from-schema

Version:

Infer TypeScript types from JSON schemas

11 lines (9 loc) 450 B
import { SchemaBase } from '../generic'; export type StringJsonSchema = SchemaBase & { readonly type: 'string'; readonly format?: 'date' | 'time' | 'date-time' | 'email' | 'hostname' | 'ipv4' | 'ipv6' | 'uri' | 'uri-reference' | 'uuid' | 'uri-template' | 'json-pointer' | 'relative-json-pointer' | 'regex'; readonly minLength?: number; readonly maxLength?: number; readonly pattern?: string; readonly examples?: string[]; };