Skip to content

Commit

Permalink
fix: use correct typings for the result of getUpsertedIds() (#5878)
Browse files Browse the repository at this point in the history
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 committed May 16, 2020
1 parent 2c90e1c commit 2ab88c2
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 2ab88c2

Please sign in to comment.