-
Type: Task
-
Resolution: Done
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
NODE-4423 Description
What problem are you facing?
It's great with Type support for updates, but it comes with at least two regressions breaking a lot of our codebase. I'm omitting _id when creating the collection type (see screenshots) - as I believe was the recommendation before.
- _id is not allowed in neither $set or $setOnInsert. It is still allowed for queries, so I'm pretty sure it's not an error in our types.
- Setting sub-documents doesn't seem to be work either.
This gives a lot of errors - especially since type errors on the queries/updates somehow breaks the entire type resolve chain (any subsequent code won't even recognise it's dealing with a promise anymore).
What driver and relevant dependency versions are you using?
Node.js Mongo Driver 4.8 and TypeScript 4.7.4
Steps to reproduce?
Set up the types as per the screenshots.
- is depended on by
-
NODE-4423 Type Regressions in 4.8
- Closed