Last change
on this file since 84d0fbb was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
823 bytes
|
Rev | Line | |
---|
[6a3a178] | 1 | import type { AddedKeywordDefinition } from "../types";
|
---|
| 2 | declare const _jsonTypes: readonly ["string", "number", "integer", "boolean", "null", "object", "array"];
|
---|
| 3 | export declare type JSONType = typeof _jsonTypes[number];
|
---|
| 4 | export declare function isJSONType(x: unknown): x is JSONType;
|
---|
| 5 | declare type ValidationTypes = {
|
---|
| 6 | [K in JSONType]: boolean | RuleGroup | undefined;
|
---|
| 7 | };
|
---|
| 8 | export interface ValidationRules {
|
---|
| 9 | rules: RuleGroup[];
|
---|
| 10 | post: RuleGroup;
|
---|
| 11 | all: {
|
---|
| 12 | [Key in string]?: boolean | Rule;
|
---|
| 13 | };
|
---|
| 14 | keywords: {
|
---|
| 15 | [Key in string]?: boolean;
|
---|
| 16 | };
|
---|
| 17 | types: ValidationTypes;
|
---|
| 18 | }
|
---|
| 19 | export interface RuleGroup {
|
---|
| 20 | type?: JSONType;
|
---|
| 21 | rules: Rule[];
|
---|
| 22 | }
|
---|
| 23 | export interface Rule {
|
---|
| 24 | keyword: string;
|
---|
| 25 | definition: AddedKeywordDefinition;
|
---|
| 26 | }
|
---|
| 27 | export declare function getRules(): ValidationRules;
|
---|
| 28 | export {};
|
---|
Note:
See
TracBrowser
for help on using the repository browser.