Skip to content

Commit 87b86a5

Browse files
chore(deps): update (#120)
1 parent f8110ef commit 87b86a5

File tree

7 files changed

+1736
-1522
lines changed

7 files changed

+1736
-1522
lines changed

declarations/ValidationError.d.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,11 @@ export type ValidationErrorConfiguration = {
1212
};
1313
export type PostFormatter = (
1414
formattedError: string,
15-
error: import('ajv').ErrorObject & {
16-
children?: import('ajv').ErrorObject[] | undefined;
17-
}
15+
error: import('./validate').SchemaUtilErrorObject
1816
) => string;
1917
export type SchemaUtilErrorObject = import('ajv').ErrorObject & {
2018
children?: import('ajv').ErrorObject[] | undefined;
2119
};
22-
export type SPECIFICITY = number;
2320
declare class ValidationError extends Error {
2421
/**
2522
* @param {Array<SchemaUtilErrorObject>} errors

declarations/index.d.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1-
export const validate: typeof import('./validate').validate;
2-
export const ValidationError: typeof import('./ValidationError').default;
1+
import { validate } from './validate';
2+
import { ValidationError } from './validate';
3+
export { validate, ValidationError };

declarations/util/Range.d.ts

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,11 @@ declare class Range {
5151
* @param {boolean} logic is not logic applied
5252
* @return {RangeValue} computed value and it's exclusive flag
5353
*/
54-
static getRangeValue(
55-
values: Array<[number, boolean]>,
56-
logic: boolean
57-
): [number, boolean];
54+
static getRangeValue(values: Array<RangeValue>, logic: boolean): RangeValue;
5855
/** @type {Array<RangeValue>} */
59-
_left: Array<[number, boolean]>;
56+
_left: Array<RangeValue>;
6057
/** @type {Array<RangeValue>} */
61-
_right: Array<[number, boolean]>;
58+
_right: Array<RangeValue>;
6259
/**
6360
* @param {number} value
6461
* @param {boolean=} exclusive
@@ -79,4 +76,4 @@ declare namespace Range {
7976
export { RangeValue, RangeValueCallback };
8077
}
8178
type RangeValue = [number, boolean];
82-
type RangeValueCallback = (rangeValue: [number, boolean]) => boolean;
79+
type RangeValueCallback = (rangeValue: RangeValue) => boolean;

declarations/validate.d.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
export type JSONSchema4 = import('json-schema').JSONSchema4;
22
export type JSONSchema6 = import('json-schema').JSONSchema6;
33
export type JSONSchema7 = import('json-schema').JSONSchema7;
4-
export type ErrorObject = import('ajv').ErrorObject;
4+
export type ErrorObject = Ajv.ErrorObject;
55
export type Extend = {
66
formatMinimum?: number | undefined;
77
formatMaximum?: number | undefined;
@@ -12,8 +12,8 @@ export type Schema =
1212
| (import('json-schema').JSONSchema4 & Extend)
1313
| (import('json-schema').JSONSchema6 & Extend)
1414
| (import('json-schema').JSONSchema7 & Extend);
15-
export type SchemaUtilErrorObject = import('ajv').ErrorObject & {
16-
children?: import('ajv').ErrorObject[] | undefined;
15+
export type SchemaUtilErrorObject = Ajv.ErrorObject & {
16+
children?: Ajv.ErrorObject[] | undefined;
1717
};
1818
export type PostFormatter = (
1919
formattedError: string,
@@ -36,4 +36,5 @@ export function validate(
3636
configuration?: ValidationErrorConfiguration | undefined
3737
): void;
3838
import ValidationError from './ValidationError';
39+
import Ajv = require('ajv');
3940
export { ValidationError };

0 commit comments

Comments
 (0)