You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I found out that ValidationError is extended from the Error instance.
If you do this below in TypeScript:
constvalidationError=newValidationError({params: [{dataPath: '.id',keyword: 'maxLength',message: 'should NOT be longer than 2 characters',params: {limit: 2},schemaPath: '#/properties/id/maxLength'}]})
It will throw a ts compile error because the argument type should be a string.
To fix this problem, I just add // @ts-ignore before new ValidationError.
Any better support for this?
The text was updated successfully, but these errors were encountered:
I found out that ValidationError is extended from the Error instance.
If you do this below in TypeScript:
It will throw a ts compile error because the argument type should be a string.
To fix this problem, I just add
// @ts-ignore
beforenew ValidationError
.Any better support for this?
The text was updated successfully, but these errors were encountered: