-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Major - P3
-
Affects Version/s: None
-
Component/s: TypeScript
What problem are you facing?
Typescript complains when using $currentDate with findOneAndUpdate.
Hovering _update gives the following error.
And here is the type declaration
MongoDB v.4.4 documentation supports boolean for $currentDate while other references mention that it it not supported anymore:
https://docs.mongodb.com/v4.4/reference/operator/update/currentDate/
https://github.com/mongodb/docs/commit/55057e64f8c8112be35560ee8d6e603baec414a3
The Node.js Driver v.4.1 support also boolean
https://mongodb.github.io/node-mongodb-native/4.1/modules.html#UpdateFilter
What driver and relevant dependency versions are you using?
- MongoDB: v4.4.0
Typescript: 4.2.3
Mongodb Node.js Driver: 4.1.3
- depends on
-
NODE-3682 Investigate NODE-3681 - Typescript complains that $currentDate is used with type boolean instead of type 'Date | Timestamp'
-
- Closed
-