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

UnorderedBulkOperation & OrderedBulkOperation missing 'length' property in Typescript definition

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:

      What problem are you facing?

      UnorderedBulkOperation and OrderedBulkOperation are missing the length property in the Typescript definitions. The property exists in Javascript (see here: https://github.com/mongodb/node-mongodb-native/blob/main/src/bulk/common.ts#L1302-L1307) but Typescript is unaware of it due to using `Object.defineProperty`.

       

      I use this property to determine if a bulk operation has operations. If it doesn't, I skip executing it.

            Assignee:
            Unassigned Unassigned
            Reporter:
            addisonelliott Addison Elliott
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: