UNPKG

@spec2ts/jsonschema

Version:

Utility to convert JSON Schemas to Typescript using TypeScript native compiler

8 lines (7 loc) 396 B
import * as ts from "typescript"; import { JSONSchema, ParserOptions } from "./core-parser"; export interface ParseSchemaOptions extends ParserOptions { name?: string; } export declare function parseSchemaFile(file: string, options?: ParseSchemaOptions): Promise<ts.Statement[]>; export declare function parseSchema(schema: JSONSchema, options?: ParseSchemaOptions): Promise<ts.Statement[]>;