-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.d.ts
49 lines (49 loc) · 2.28 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
import { ValidationError } from "./validation/ValidationError";
import { ValidatorOptions } from "./validation/ValidatorOptions";
import { ValidationSchema } from "./validation-schema/ValidationSchema";
export * from "./container";
export * from "./decorator/decorators";
export * from "./decorator/ValidationOptions";
export * from "./validation/ValidatorConstraintInterface";
export * from "./validation/ValidationError";
export * from "./validation/ValidationTypeOptions";
export * from "./validation/ValidatorOptions";
export * from "./validation/ValidationArguments";
export * from "./validation/ValidationTypes";
export * from "./validation/Validator";
export * from "./validation-schema/ValidationSchema";
export * from "./register-decorator";
export * from "./metadata/MetadataStorage";
/**
* Validates given object.
*/
export declare function validate(object: Object, validatorOptions?: ValidatorOptions): Promise<ValidationError[]>;
/**
* Validates given object by a given validation schema.
*/
export declare function validate(schemaName: string, object: Object, validatorOptions?: ValidatorOptions): Promise<ValidationError[]>;
/**
* Validates given object and reject on error.
*/
export declare function validateOrReject(object: Object, validatorOptions?: ValidatorOptions): Promise<void>;
/**
* Validates given object by a given validation schema and reject on error.
*/
export declare function validateOrReject(schemaName: string, object: Object, validatorOptions?: ValidatorOptions): Promise<void>;
/**
* Performs sync validation of the given object.
* Note that this method completely ignores async validations.
* If you want to properly perform validation you need to call validate method instead.
*/
export declare function validateSync(object: Object, validatorOptions?: ValidatorOptions): ValidationError[];
/**
* Validates given object by a given validation schema.
* Note that this method completely ignores async validations.
* If you want to properly perform validation you need to call validate method instead.
*/
export declare function validateSync(schemaName: string, object: Object, validatorOptions?: ValidatorOptions): ValidationError[];
/**
* Registers a new validation schema.
*/
export declare function registerSchema(schema: ValidationSchema): void;
//# sourceMappingURL=index.d.ts.map