fix: use correct typings for the result of `getUpsertedIds()` (#5878) · typeorm/typeorm@2ab88c2

Skip to content

Navigation Menu

Sign in

Appearance settings

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

Commit 2ab88c2

authored

fix: use correct typings for the result of getUpsertedIds() (#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).

1 parent 2c90e1c commit 2ab88c2

File tree

1 file changed

+

1

-

1

lines changed

1 file changed

+

1

-

1

lines changed

Lines changed: 1 addition & 1 deletion

Original file line numberDiff line numberDiff line change

@@ -4271,7 +4271,7 @@ export interface BulkWriteResult {

42714271

/**

42724272

* Return an array of upserted ids.

42734273

*/

4274-

getUpsertedIds(): Array<Object>;

4274+

getUpsertedIds(): Array<{ _id: string, index: number }>;

42754275
42764276

/**

42774277

* Retrieve the write concern error if any.

0 commit comments

Comments

 (0)