Skip to content

Commit a143d3b

Browse files
authored
feat(NODE-4733): deprecate result and getLastOp (#3458)
1 parent bf7a132 commit a143d3b

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

src/bulk/common.ts

+12-2
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,11 @@ export type AnyBulkWriteOperation<TSchema extends Document = Document> =
130130
| { deleteOne: DeleteOneModel<TSchema> }
131131
| { deleteMany: DeleteManyModel<TSchema> };
132132

133-
/** @public */
133+
/**
134+
* @public
135+
*
136+
* @deprecated Will be made internal in 5.0
137+
*/
134138
export interface BulkResult {
135139
ok: number;
136140
writeErrors: WriteError[];
@@ -176,6 +180,7 @@ export class Batch<T = Document> {
176180
* The result of a bulk write.
177181
*/
178182
export class BulkWriteResult {
183+
/** @deprecated Will be removed in 5.0 */
179184
result: BulkResult;
180185

181186
/**
@@ -295,7 +300,11 @@ export class BulkWriteResult {
295300
return this.result.writeErrors;
296301
}
297302

298-
/** Retrieve lastOp if available */
303+
/**
304+
* Retrieve lastOp if available
305+
*
306+
* @deprecated Will be removed in 5.0
307+
*/
299308
getLastOp(): Document | undefined {
300309
return this.result.opTime;
301310
}
@@ -322,6 +331,7 @@ export class BulkWriteResult {
322331
}
323332
}
324333

334+
/* @deprecated Will be removed in 5.0 release */
325335
toJSON(): BulkResult {
326336
return this.result;
327337
}

0 commit comments

Comments
 (0)