UNPKG

855 BTypeScriptView Raw
1import type { CodeKeywordDefinition, ErrorObject, KeywordErrorDefinition, SchemaMap, AnySchema } from "../../types";
2import type { KeywordCxt } from "../../compile/validate";
3export declare type PropertyDependencies = {
4 [K in string]?: string[];
5};
6export interface DependenciesErrorParams {
7 property: string;
8 missingProperty: string;
9 depsCount: number;
10 deps: string;
11}
12export declare type DependenciesError = ErrorObject<"dependencies", DependenciesErrorParams, {
13 [K in string]?: string[] | AnySchema;
14}>;
15export declare const error: KeywordErrorDefinition;
16declare const def: CodeKeywordDefinition;
17export declare function validatePropertyDeps(cxt: KeywordCxt, propertyDeps?: {
18 [K in string]?: string[];
19}): void;
20export declare function validateSchemaDeps(cxt: KeywordCxt, schemaDeps?: SchemaMap): void;
21export default def;