File tree Expand file tree Collapse file tree 3 files changed +7
-6
lines changed Expand file tree Collapse file tree 3 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -36,6 +36,8 @@ declare function validate(
36
36
configuration ?: ValidationErrorConfiguration | undefined
37
37
) : void ;
38
38
declare namespace validate {
39
- export { _default as ValidationError , _default as ValidateError } ;
39
+ export { ValidationError } ;
40
+ export { ValidationError as ValidateError } ;
40
41
}
41
42
import Ajv from 'ajv' ;
43
+ import ValidationError from './ValidationError' ;
Original file line number Diff line number Diff line change 1
1
const validate = require ( './validate' ) ;
2
- const ValidationError = require ( './ValidationError' ) ;
3
2
4
3
module . exports = validate . default ;
5
- module . exports . ValidationError = ValidationError . default ;
6
-
7
- // Todo remove this in next major release
8
- module . exports . ValidateError = ValidationError . default ;
Original file line number Diff line number Diff line change @@ -140,4 +140,8 @@ function filterErrors(errors) {
140
140
return newErrors ;
141
141
}
142
142
143
+ // TODO change after resolve https://github.com/microsoft/TypeScript/issues/34994
144
+ validate . ValidationError = ValidationError ;
145
+ validate . ValidateError = ValidationError ;
146
+
143
147
export default validate ;
You can’t perform that action at this time.
0 commit comments