source: trip-planner-front/node_modules/schema-utils/declarations/validate.d.ts@ 84d0fbb

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: 1.4 KB
Line 
1export default validate;
2export type JSONSchema4 = import('json-schema').JSONSchema4;
3export type JSONSchema6 = import('json-schema').JSONSchema6;
4export type JSONSchema7 = import('json-schema').JSONSchema7;
5export type ErrorObject = import('ajv').ErrorObject;
6export type Extend = {
7 formatMinimum?: number | undefined;
8 formatMaximum?: number | undefined;
9 formatExclusiveMinimum?: boolean | undefined;
10 formatExclusiveMaximum?: boolean | undefined;
11};
12export type Schema =
13 | (import('json-schema').JSONSchema4 & Extend)
14 | (import('json-schema').JSONSchema6 & Extend)
15 | (import('json-schema').JSONSchema7 & Extend);
16export type SchemaUtilErrorObject = import('ajv').ErrorObject & {
17 children?: import('ajv').ErrorObject[] | undefined;
18};
19export type PostFormatter = (
20 formattedError: string,
21 error: SchemaUtilErrorObject
22) => string;
23export type ValidationErrorConfiguration = {
24 name?: string | undefined;
25 baseDataPath?: string | undefined;
26 postFormatter?: PostFormatter | undefined;
27};
28/**
29 * @param {Schema} schema
30 * @param {Array<object> | object} options
31 * @param {ValidationErrorConfiguration=} configuration
32 * @returns {void}
33 */
34declare function validate(
35 schema: Schema,
36 options: Array<object> | object,
37 configuration?: ValidationErrorConfiguration | undefined
38): void;
39declare namespace validate {
40 export { ValidationError };
41 export { ValidationError as ValidateError };
42}
43import ValidationError from './ValidationError';
Note: See TracBrowser for help on using the repository browser.