We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
8.0.0
20.9.0
6.2.0
5.2.2
v8 of Mongoose changed doc.deleteOne() to return a query instead of the deleted document (see migration guide).
doc.deleteOne()
However, the Typescript types seem to not have been updated as they still indicate that the document is returned.
deleteOne
Expect the Typescript return type to be Promise<DeleteResult> instead of Promise<this>
Promise<DeleteResult>
Promise<this>
The text was updated successfully, but these errors were encountered:
types(document): correct return type for doc.deleteOne() re: Mongoo…
c424f10
…se 8 breaking change Fix #14081
Merge pull request #14110 from Automattic/vkarpov15/gh-14081
3e0a90c
types(document): correct return type for `doc.deleteOne()` re: Mongoose 8 breaking change
Successfully merging a pull request may close this issue.
Prerequisites
Mongoose version
8.0.0
Node.js version
20.9.0
MongoDB server version
6.2.0
Typescript version (if applicable)
5.2.2
Description
v8 of Mongoose changed
doc.deleteOne()
to return a query instead of the deleted document (see migration guide).However, the Typescript types seem to not have been updated as they still indicate that the document is returned.
Steps to Reproduce
deleteOne
Expected Behavior
Expect the Typescript return type to be
Promise<DeleteResult>
instead ofPromise<this>
The text was updated successfully, but these errors were encountered: