-
-
Notifications
You must be signed in to change notification settings - Fork 907
Open
Labels
Description
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:
import {ValidationError} from 'ajv';
function formatAjvError(error: ValidationError): CustomErrorDto {}
In v8 I must write:
import Ajv from 'ajv';
function formatAjvError(error: InstanceType<typeof Ajv['ValidationError']>): CustomErrorDto {}
This is unnecessary verbose.
What results did you expect?
ValidationError
is directly exported from ajv
module.
Are you going to resolve the issue?
Yes, I can make PR for that.