Uploaded image for project: 'Node.js Driver'
  1. Node.js Driver
  2. NODE-3128

Much of the type safety from the 3.x driver is missing in the 4.x betas

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Critical - P2 Critical - P2
    • None
    • Affects Version/s: 4.0.0
    • Component/s: None

      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.

            Assignee:
            Unassigned Unassigned
            Reporter:
            bytenik@bytenik.com David Pfeffer
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: