From 3b876633008651d6ebdba9612e99e9b2eee411b7 Mon Sep 17 00:00:00 2001 From: Daniel Swann Date: Fri, 3 Jan 2025 13:57:22 -0500 Subject: [PATCH] Separate query and command types in `$db` update operations --- env.d.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/env.d.ts b/env.d.ts index 5f44134..68f2b78 100644 --- a/env.d.ts +++ b/env.d.ts @@ -959,14 +959,14 @@ declare global { * @param query Specifies deletion criteria using query operators. * @param command The modifications to apply. * {@link https://docs.mongodb.com/manual/reference/method/db.collection.update/#parameters} */ - u: (query: MongoQuery | MongoQuery[], command: MongoUpdateCommand) => + u: (query: MongoQuery | MongoQuery[], command: MongoUpdateCommand) => { n: number, opTime: { t: number }, ok: 0 | 1, nModified: number }[] /** Updates one document within the collection based on the filter. * @param query Specifies deletion criteria using query operators. * @param command The modifications to apply. * {@link https://docs.mongodb.com/manual/reference/method/db.collection.update/#parameters} */ - u1: (query: MongoQuery | MongoQuery[], command: MongoUpdateCommand) => + u1: (query: MongoQuery | MongoQuery[], command: MongoUpdateCommand) => { n: number, ok: 0 | 1, opTime: { t: number }, nModified: number }[] /** Update or insert document. @@ -976,7 +976,7 @@ declare global { * @param query Specifies deletion criteria using query operators. * @param command The modifications to apply. * {@link https://docs.mongodb.com/manual/reference/method/db.collection.update/#parameters} */ - us: (query: MongoQuery | MongoQuery[], command: MongoUpdateCommand) => + us: (query: MongoQuery | MongoQuery[], command: MongoUpdateCommand) => { n: number, ok: 0 | 1, opTime: { t: number }, nModified: number }[] ObjectId: () => MongoObjectId