UNPKG

from-schema

Version:

Infer TypeScript types from JSON schemas

15 lines (13 loc) 343 B
import { SchemaBase } from '../generic'; type DateBase = SchemaBase & { readonly type: 'date'; }; type VariableDate = DateBase & { readonly minimum?: Date; readonly maximum?: Date; }; type ConstantDate = DateBase & { readonly const: Date; }; export type DateTsonSchema = SchemaBase & (VariableDate | ConstantDate); export {};