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

Documentation: Document.prototype.validateSync returns ValidationError #7499

Merged
merged 1 commit into from
Feb 8, 2019

Conversation

JulioJu
Copy link
Contributor

@JulioJu JulioJu commented Feb 8, 2019

Sources:
1.

_this.invalidate(path, err, undefined, true);

2.
if (this.$__.validationError === err) {

3.
const err = _this.$__.validationError;

Summary
Document.prototype.validateSync send ValidationError (it inherits of MongooseError).

If your are ok with that thanks sources above, I will make a PR to correct @types/mongoose accordingly

Copy link
Collaborator

@vkarpov15 vkarpov15 left a comment

Choose a reason for hiding this comment

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

Thanks!

@vkarpov15 vkarpov15 added this to the 5.4.11 milestone Feb 8, 2019
@vkarpov15 vkarpov15 merged commit c3502ce into Automattic:master Feb 8, 2019
JulioJu pushed a commit to JulioJu/DefinitelyTyped that referenced this pull request Feb 9, 2019
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.

2 participants