-
Type: Bug
-
Resolution: Duplicate
-
Priority: Minor - P4
-
None
-
Affects Version/s: None
-
Component/s: None
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.