1 | import { IValidationRule } from './IValidationRule';
|
2 | import { ValidationResult } from './ValidationResult';
|
3 | import { Schema } from './Schema';
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 | export declare class MapSchema extends Schema {
|
16 | private _keyType;
|
17 | private _valueType;
|
18 | |
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 |
|
26 |
|
27 |
|
28 |
|
29 | constructor(keyType?: any, valueType?: any, required?: boolean, rules?: IValidationRule[]);
|
30 | /**
|
31 | * Gets the type of map keys.
|
32 | * Null means that keys may have any type.
|
33 | *
|
34 | * @returns the type of map keys.
|
35 | */
|
36 | getKeyType(): any;
|
37 | /**
|
38 | * Sets the type of map keys.
|
39 | * Null means that keys may have any type.
|
40 | *
|
41 | * @param value a type of map keys.
|
42 | */
|
43 | setKeyType(value: any): void;
|
44 | /**
|
45 | * Gets the type of map values.
|
46 | * Null means that values may have any type.
|
47 | *
|
48 | * @returns the type of map values.
|
49 | */
|
50 | getValueType(): any;
|
51 | /**
|
52 | * Sets the type of map values.
|
53 | * Null means that values may have any type.
|
54 | *
|
55 | * @param value a type of map values.
|
56 | */
|
57 | setValueType(value: any): void;
|
58 | /**
|
59 | * Validates a given value against the schema and configured validation rules.
|
60 | *
|
61 | * @param path a dot notation path to the value.
|
62 | * @param value a value to be validated.
|
63 | * @param results a list with validation results to add new results.
|
64 | */
|
65 | protected performValidation(path: string, value: any, results: ValidationResult[]): void;
|
66 | }
|