UNPKG

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