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 have searched existing issues to ensure the bug has not already been reported
Mongoose version
6.5.3
Node.js version
x
MongoDB server version
x
Description
The documentation expose query middlewares findOneAndReplace() and replaceOne() while types are not allowing using the string findOneAndReplace and replaceOne as first parameter of schema.pre(...)
Jule-
changed the title
Typescript: MongooseQueryMiddleware missing "findOneAndReplace"
Typescript: MongooseQueryMiddleware missing "findOneAndReplace" and "replaceOne"
Aug 25, 2022
Prerequisites
Mongoose version
6.5.3
Node.js version
x
MongoDB server version
x
Description
The documentation expose query middlewares
findOneAndReplace()
andreplaceOne()
while types are not allowing using the stringfindOneAndReplace
andreplaceOne
as first parameter ofschema.pre(...)
Steps to Reproduce
https://codesandbox.io/s/beautiful-mclaren-zos0cn?file=/src/index.ts
Expected Behavior
No typescript error.
The text was updated successfully, but these errors were encountered: