File tree Expand file tree Collapse file tree 7 files changed +1736
-1522
lines changed Expand file tree Collapse file tree 7 files changed +1736
-1522
lines changed Original file line number Diff line number Diff line change @@ -12,14 +12,11 @@ export type ValidationErrorConfiguration = {
12
12
} ;
13
13
export type PostFormatter = (
14
14
formattedError : string ,
15
- error : import ( 'ajv' ) . ErrorObject & {
16
- children ?: import ( 'ajv' ) . ErrorObject [ ] | undefined ;
17
- }
15
+ error : import ( './validate' ) . SchemaUtilErrorObject
18
16
) => string;
19
17
export type SchemaUtilErrorObject = import ( 'ajv' ) . ErrorObject & {
20
18
children ?: import ( 'ajv' ) . ErrorObject [ ] | undefined ;
21
19
} ;
22
- export type SPECIFICITY = number;
23
20
declare class ValidationError extends Error {
24
21
/**
25
22
* @param {Array<SchemaUtilErrorObject> } errors
Original file line number Diff line number Diff line change 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 } ;
Original file line number Diff line number Diff line change @@ -51,14 +51,11 @@ declare class Range {
51
51
* @param {boolean } logic is not logic applied
52
52
* @return {RangeValue } computed value and it's exclusive flag
53
53
*/
54
- static getRangeValue (
55
- values : Array < [ number , boolean ] > ,
56
- logic : boolean
57
- ) : [ number , boolean ] ;
54
+ static getRangeValue ( values : Array < RangeValue > , logic : boolean ) : RangeValue ;
58
55
/** @type {Array<RangeValue> } */
59
- _left : Array < [ number , boolean ] > ;
56
+ _left : Array < RangeValue > ;
60
57
/** @type {Array<RangeValue> } */
61
- _right : Array < [ number , boolean ] > ;
58
+ _right : Array < RangeValue > ;
62
59
/**
63
60
* @param {number } value
64
61
* @param {boolean= } exclusive
@@ -79,4 +76,4 @@ declare namespace Range {
79
76
export { RangeValue , RangeValueCallback } ;
80
77
}
81
78
type RangeValue = [ number , boolean ] ;
82
- type RangeValueCallback = ( rangeValue : [ number , boolean ] ) => boolean ;
79
+ type RangeValueCallback = ( rangeValue : RangeValue ) => boolean ;
Original file line number Diff line number Diff line change 1
1
export type JSONSchema4 = import ( 'json-schema' ) . JSONSchema4 ;
2
2
export type JSONSchema6 = import ( 'json-schema' ) . JSONSchema6 ;
3
3
export type JSONSchema7 = import ( 'json-schema' ) . JSONSchema7 ;
4
- export type ErrorObject = import ( 'ajv' ) . ErrorObject ;
4
+ export type ErrorObject = Ajv . ErrorObject ;
5
5
export type Extend = {
6
6
formatMinimum ?: number | undefined ;
7
7
formatMaximum ?: number | undefined ;
@@ -12,8 +12,8 @@ export type Schema =
12
12
| ( import ( 'json-schema' ) . JSONSchema4 & Extend )
13
13
| ( import ( 'json-schema' ) . JSONSchema6 & Extend )
14
14
| ( 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 ;
17
17
} ;
18
18
export type PostFormatter = (
19
19
formattedError : string ,
@@ -36,4 +36,5 @@ export function validate(
36
36
configuration ?: ValidationErrorConfiguration | undefined
37
37
) : void ;
38
38
import ValidationError from './ValidationError' ;
39
+ import Ajv = require( 'ajv' ) ;
39
40
export { ValidationError } ;
You can’t perform that action at this time.
0 commit comments