We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent de253a7 commit 320dde0Copy full SHA for 320dde0
src/bulk/common.ts
@@ -1178,6 +1178,10 @@ export abstract class BulkOperationBase {
1178
);
1179
}
1180
1181
+ get length(): number {
1182
+ return this.s.currentIndex;
1183
+ }
1184
+
1185
get bsonOptions(): BSONSerializeOptions {
1186
return this.s.bsonOptions;
1187
@@ -1274,13 +1278,6 @@ export abstract class BulkOperationBase {
1274
1278
1275
1279
1276
1280
1277
-Object.defineProperty(BulkOperationBase.prototype, 'length', {
- enumerable: true,
- get() {
- return this.s.currentIndex;
1281
- }
1282
-});
1283
-
1284
function isInsertBatch(batch: Batch): boolean {
1285
return batch.batchType === BatchType.INSERT;
1286
0 commit comments