Skip to content
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

Typings: ValidationError should only contain ValidatorErrors or CastErrors #11369

Merged
merged 4 commits into from
Feb 21, 2022

Conversation

Uzlopak
Copy link
Collaborator

@Uzlopak Uzlopak commented Feb 9, 2022

Resolves #11367

Extracted Error-typings from index.d.ts
renamed class Error to class MongooseError to ensure we extend from MongooseError and not from global.Error class
added typings test for #11367
fixed the issue #11367

Copy link
Collaborator

@AbdelrahmanHafez AbdelrahmanHafez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, splitting types into multiple files will make things much easier to work with.
Thanks 👍

@Uzlopak
Copy link
Collaborator Author

Uzlopak commented Feb 18, 2022

@AbdelrahmanHafez

Thank you Hafez. Yes splitting the typings should make it easier to handle them better. I also extracted the Connection Typings in #11418 . Please have a look at it. Here i didnt write any additional tests, because it would be kind of waste of time. But in the Connection Types PR I wrote alot of typings tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ValidationError.errors is wrongly typed
3 participants