code.d.ts 1.4 KB

1234567891011121314151617
  1. import type { SchemaMap } from "../types";
  2. import type { SchemaCxt } from "../compile";
  3. import type { KeywordCxt } from "../compile/validate";
  4. import { CodeGen, Code, Name } from "../compile/codegen";
  5. export declare function checkReportMissingProp(cxt: KeywordCxt, prop: string): void;
  6. export declare function checkMissingProp({ gen, data, it: { opts } }: KeywordCxt, properties: string[], missing: Name): Code;
  7. export declare function reportMissingProp(cxt: KeywordCxt, missing: Name): void;
  8. export declare function hasPropFunc(gen: CodeGen): Name;
  9. export declare function isOwnProperty(gen: CodeGen, data: Name, property: Name | string): Code;
  10. export declare function propertyInData(gen: CodeGen, data: Name, property: Name | string, ownProperties?: boolean): Code;
  11. export declare function noPropertyInData(gen: CodeGen, data: Name, property: Name | string, ownProperties?: boolean): Code;
  12. export declare function allSchemaProperties(schemaMap?: SchemaMap): string[];
  13. export declare function schemaProperties(it: SchemaCxt, schemaMap: SchemaMap): string[];
  14. export declare function callValidateCode({ schemaCode, data, it: { gen, topSchemaRef, schemaPath, errorPath }, it }: KeywordCxt, func: Code, context: Code, passSchema?: boolean): Code;
  15. export declare function usePattern({ gen, it: { opts } }: KeywordCxt, pattern: string): Name;
  16. export declare function validateArray(cxt: KeywordCxt): Name;
  17. export declare function validateUnion(cxt: KeywordCxt): void;