-
Type: Task
-
Resolution: Done
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
NODE-4108 Description
What problem are you facing?
The Node.js Driver types for session.withTransaction are completely wrong and misleading
What driver and relevant dependency versions are you using?
`mongodb@4.4.1`
Steps to reproduce?
Look at the code in mongodb.d.ts. It says that the return type depends on the input to the withTransaction function. But in runtime, the function always returns :
{ "ok": 1,"$clusterTime": { "clusterTime": { "$timestamp": "7077570972357754881" }, "signature": { "hash": "AAAAAAAAAAAAAAAAAAAAAAAAAAA=", "keyId": 0 } }, "operationTime": { "$timestamp": "7077570972357754881" } }
I don't know if this is a bug in `withTransaction` - or a type issue - but it needs to be fixed soon. I have tried to raise attention about this for almost a year in the community 😅
- is depended on by
-
NODE-4108 session.withTransaction has wrong return type
- Closed