Urara-Blog/node_modules/.pnpm-store/v3/files/b1/cd65377c44787bba4212faa1d42122a5e2d532a914fa6879ef63aa99980ce9affa424ba15450f130270a621dc0fbd2f770ce5af0347cecd129ee4a8db17956
2022-08-14 01:14:53 +08:00

28 lines
823 B
Text

import type { AddedKeywordDefinition } from "../types";
declare const _jsonTypes: readonly ["string", "number", "integer", "boolean", "null", "object", "array"];
export declare type JSONType = typeof _jsonTypes[number];
export declare function isJSONType(x: unknown): x is JSONType;
declare type ValidationTypes = {
[K in JSONType]: boolean | RuleGroup | undefined;
};
export interface ValidationRules {
rules: RuleGroup[];
post: RuleGroup;
all: {
[Key in string]?: boolean | Rule;
};
keywords: {
[Key in string]?: boolean;
};
types: ValidationTypes;
}
export interface RuleGroup {
type?: JSONType;
rules: Rule[];
}
export interface Rule {
keyword: string;
definition: AddedKeywordDefinition;
}
export declare function getRules(): ValidationRules;
export {};