Skip to content

Commit

Permalink
fix: use correct typings for the result of getUpsertedIds() (typeor…
Browse files Browse the repository at this point in the history
…m#5878)

This method returns an object with `_id` and `index` properties, according to [the description of `BulkWriteResult`](https://docs.mongodb.com/manual/reference/method/BulkWriteResult/#BulkWriteResult.upserted).
  • Loading branch information
jessepinho authored and Svetlozar committed Jan 12, 2021
1 parent 7b39a5a commit 79f54e0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/driver/mongodb/typings.ts
Expand Up @@ -4271,7 +4271,7 @@ export interface BulkWriteResult {
/**
* Return an array of upserted ids.
*/
getUpsertedIds(): Array<Object>;
getUpsertedIds(): Array<{ _id: string, index: number }>;

/**
* Retrieve the write concern error if any.
Expand Down

0 comments on commit 79f54e0

Please sign in to comment.