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

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Duplicate
    • Priority: Critical - P2
    • None
    • Affects Version/s: 4.0.0
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • 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
            Reporter:
            David Pfeffer
            None
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: