UNPKG

create-validator-ts

Version:

Create JSON Schema validator from TypeScript.

26 lines 878 B
import { CodeGenerator } from "./default-code-generator.js"; export type TsJsonSchemaGeneratorOptions = { extraTags?: string[]; sortProps?: boolean; strictTuples?: boolean; encodeRefs?: boolean; /** * true by default */ skipTypeCheck?: boolean; /** * false by default */ additionalProperties?: boolean; }; export type GeneratorValidatorOptions = { cwd: string; validatorGenerator: CodeGenerator; tsconfigFilePath: string; filePath: string; } & TsJsonSchemaGeneratorOptions; export declare function generateValidator({ cwd, validatorGenerator, tsconfigFilePath, filePath, extraTags, sortProps, strictTuples, skipTypeCheck, encodeRefs, additionalProperties }: GeneratorValidatorOptions): Promise<{ validatorFilePath: string; code: string; } | undefined>; //# sourceMappingURL=create-validator-ts.d.ts.map