New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migration from v6 to v8: ValidationError isn't exposed anymore #1832
Comments
So the error classes are defined as static members on the core class, but not on the subclasses that the users use, and you suggest to add static members to these subclasses as well - do I understand it correctly? |
No. My issue that it's currently impossible import eg.
I updated issue to better reflect intended use. |
ok, let's export both error classes that Ajv defines, from all 4 Ajv classes. |
@epoberezkin Done in #1840 |
Also having this issue, is there anything I can do to help this over the line? |
For anyone finding this, I regressed the install back to 6.12.6 in the short term and its working. |
The classes you are missing can be imported from dist/compile/ref_error and dist/runtime/validation_error. |
What version of Ajv are you using? Does the issue happen if you use the latest version?
I was using 6, I wanted to migrate to 8.
Ajv options object
N/A
JSON Schema
N/A
Your code
In v6 I could write code like:
In v8 I must write:
This is unnecessary verbose.
What results did you expect?
ValidationError
is directly exported fromajv
module.Are you going to resolve the issue?
Yes, I can make PR for that.
The text was updated successfully, but these errors were encountered: