UNPKG

ts-json-schema-generator

Version:

Generate JSON schema from your Typescript sources

15 lines (14 loc) 498 B
import ts from "typescript"; export type PartialDiagnostic = Omit<ts.Diagnostic, "category" | "file" | "start" | "length"> & { file?: ts.SourceFile; start?: number; length?: number; node?: ts.Node; category?: ts.DiagnosticCategory; }; export declare abstract class BaseError extends Error { readonly diagnostic: ts.Diagnostic; constructor(diagnostic: PartialDiagnostic); static createDiagnostic(diagnostic: PartialDiagnostic): ts.Diagnostic; format(): string; }