UNPKG

from-schema

Version:

Infer TypeScript types from JSON schemas

7 lines (5 loc) 287 B
import { ObjectJsonSchema } from './ObjectJsonSchema'; import { PrimitiveOrFromJsonSchema } from './PrimitiveOrFromJsonSchema'; export type FromPropertySchemas<T extends ObjectJsonSchema> = { -readonly [K in keyof T['properties']]: PrimitiveOrFromJsonSchema<T['properties'][K]>; };