code.d.ts 1.1 KB

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