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

Incorrect return type of findByIdAndDelete() #14190

Closed
2 tasks done
tommybernaciak opened this issue Dec 21, 2023 · 0 comments · Fixed by #14196
Closed
2 tasks done

Incorrect return type of findByIdAndDelete() #14190

tommybernaciak opened this issue Dec 21, 2023 · 0 comments · Fixed by #14196
Labels
typescript Types or Types-test related issue / Pull Request
Milestone

Comments

@tommybernaciak
Copy link

Prerequisites

  • I have written a descriptive issue title
  • I have searched existing issues to ensure the bug has not already been reported

Mongoose version

8.0.3

Node.js version

18.18.2

MongoDB server version

6.0.12

Typescript version (if applicable)

No response

Description

The return type for doc.findByIdAndDelete(...) is of type ModifyResult and should be a document

Steps to Reproduce

Screenshot from 2023-12-21 09-07-27

Expected Behavior

Expected that the return type is the document, not ModifyResult

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
typescript Types or Types-test related issue / Pull Request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants