-
Type: Bug
-
Resolution: Duplicate
-
Priority: Critical - P2
-
None
-
Affects Version/s: 4.0.0
-
Component/s: None
-
(copied to CRM)
-
Empty show more show less
The 3.x node.js driver shipped with the a .d.ts file. I understand this was not produced from TypeScript, and that the 4.x driver is now written in TypeScript.
However, the 4.x driver seems to have substantially reduced type safety. For example, whereas previously you could call .db<T>('collection name'), you now can only callĀ .db('collection name'). Likewise, a query result's Cursor<T> has been replaced with non-generic FindCursor.
Is this by design, or, is this a bug in the typing? If the former, it is a major step down from the 3.x driver.
- duplicates
-
NODE-3115 Make use of TypeScript generic types
- Closed