@@ -92,10 +92,10 @@ import type { CountOptions } from './operations/count';
92
92
import type {
93
93
Filter ,
94
94
TODO_NODE_3286 ,
95
- UpdateQuery ,
95
+ UpdateFilter ,
96
96
WithId ,
97
97
OptionalId ,
98
- FlattenIfArray
98
+ Flatten
99
99
} from './mongo_types' ;
100
100
101
101
/** @public */
@@ -414,27 +414,27 @@ export class Collection<TSchema extends Document = Document> {
414
414
*/
415
415
updateOne (
416
416
filter : Filter < TSchema > ,
417
- update : UpdateQuery < TSchema > | Partial < TSchema >
417
+ update : UpdateFilter < TSchema > | Partial < TSchema >
418
418
) : Promise < UpdateResult | Document > ;
419
419
updateOne (
420
420
filter : Filter < TSchema > ,
421
- update : UpdateQuery < TSchema > | Partial < TSchema > ,
421
+ update : UpdateFilter < TSchema > | Partial < TSchema > ,
422
422
callback : Callback < UpdateResult | Document >
423
423
) : void ;
424
424
updateOne (
425
425
filter : Filter < TSchema > ,
426
- update : UpdateQuery < TSchema > | Partial < TSchema > ,
426
+ update : UpdateFilter < TSchema > | Partial < TSchema > ,
427
427
options : UpdateOptions
428
428
) : Promise < UpdateResult | Document > ;
429
429
updateOne (
430
430
filter : Filter < TSchema > ,
431
- update : UpdateQuery < TSchema > | Partial < TSchema > ,
431
+ update : UpdateFilter < TSchema > | Partial < TSchema > ,
432
432
options : UpdateOptions ,
433
433
callback : Callback < UpdateResult | Document >
434
434
) : void ;
435
435
updateOne (
436
436
filter : Filter < TSchema > ,
437
- update : UpdateQuery < TSchema > | Partial < TSchema > ,
437
+ update : UpdateFilter < TSchema > | Partial < TSchema > ,
438
438
options ?: UpdateOptions | Callback < UpdateResult | Document > ,
439
439
callback ?: Callback < UpdateResult | Document >
440
440
) : Promise < UpdateResult | Document > | void {
@@ -502,27 +502,27 @@ export class Collection<TSchema extends Document = Document> {
502
502
*/
503
503
updateMany (
504
504
filter : Filter < TSchema > ,
505
- update : UpdateQuery < TSchema >
505
+ update : UpdateFilter < TSchema >
506
506
) : Promise < UpdateResult | Document > ;
507
507
updateMany (
508
508
filter : Filter < TSchema > ,
509
- update : UpdateQuery < TSchema > ,
509
+ update : UpdateFilter < TSchema > ,
510
510
callback : Callback < UpdateResult | Document >
511
511
) : void ;
512
512
updateMany (
513
513
filter : Filter < TSchema > ,
514
- update : UpdateQuery < TSchema > ,
514
+ update : UpdateFilter < TSchema > ,
515
515
options : UpdateOptions
516
516
) : Promise < UpdateResult | Document > ;
517
517
updateMany (
518
518
filter : Filter < TSchema > ,
519
- update : UpdateQuery < TSchema > ,
519
+ update : UpdateFilter < TSchema > ,
520
520
options : UpdateOptions ,
521
521
callback : Callback < UpdateResult | Document >
522
522
) : void ;
523
523
updateMany (
524
524
filter : Filter < TSchema > ,
525
- update : UpdateQuery < TSchema > ,
525
+ update : UpdateFilter < TSchema > ,
526
526
options ?: UpdateOptions | Callback < UpdateResult | Document > ,
527
527
callback ?: Callback < UpdateResult | Document >
528
528
) : Promise < UpdateResult | Document > | void {
@@ -1116,30 +1116,30 @@ export class Collection<TSchema extends Document = Document> {
1116
1116
*/
1117
1117
distinct < Key extends keyof WithId < TSchema > > (
1118
1118
key : Key
1119
- ) : Promise < Array < FlattenIfArray < WithId < TSchema > [ Key ] > > > ;
1119
+ ) : Promise < Array < Flatten < WithId < TSchema > [ Key ] > > > ;
1120
1120
distinct < Key extends keyof WithId < TSchema > > (
1121
1121
key : Key ,
1122
- callback : Callback < Array < FlattenIfArray < WithId < TSchema > [ Key ] > > >
1122
+ callback : Callback < Array < Flatten < WithId < TSchema > [ Key ] > > >
1123
1123
) : void ;
1124
1124
distinct < Key extends keyof WithId < TSchema > > (
1125
1125
key : Key ,
1126
1126
filter : Filter < TSchema >
1127
- ) : Promise < Array < FlattenIfArray < WithId < TSchema > [ Key ] > > > ;
1127
+ ) : Promise < Array < Flatten < WithId < TSchema > [ Key ] > > > ;
1128
1128
distinct < Key extends keyof WithId < TSchema > > (
1129
1129
key : Key ,
1130
1130
filter : Filter < TSchema > ,
1131
- callback : Callback < Array < FlattenIfArray < WithId < TSchema > [ Key ] > > >
1131
+ callback : Callback < Array < Flatten < WithId < TSchema > [ Key ] > > >
1132
1132
) : void ;
1133
1133
distinct < Key extends keyof WithId < TSchema > > (
1134
1134
key : Key ,
1135
1135
filter : Filter < TSchema > ,
1136
1136
options : DistinctOptions
1137
- ) : Promise < Array < FlattenIfArray < WithId < TSchema > [ Key ] > > > ;
1137
+ ) : Promise < Array < Flatten < WithId < TSchema > [ Key ] > > > ;
1138
1138
distinct < Key extends keyof WithId < TSchema > > (
1139
1139
key : Key ,
1140
1140
filter : Filter < TSchema > ,
1141
1141
options : DistinctOptions ,
1142
- callback : Callback < Array < FlattenIfArray < WithId < TSchema > [ Key ] > > >
1142
+ callback : Callback < Array < Flatten < WithId < TSchema > [ Key ] > > >
1143
1143
) : void ;
1144
1144
1145
1145
// Embedded documents overload
@@ -1320,27 +1320,27 @@ export class Collection<TSchema extends Document = Document> {
1320
1320
*/
1321
1321
findOneAndUpdate (
1322
1322
filter : Filter < TSchema > ,
1323
- update : UpdateQuery < TSchema >
1323
+ update : UpdateFilter < TSchema >
1324
1324
) : Promise < ModifyResult < TSchema > > ;
1325
1325
findOneAndUpdate (
1326
1326
filter : Filter < TSchema > ,
1327
- update : UpdateQuery < TSchema > ,
1327
+ update : UpdateFilter < TSchema > ,
1328
1328
callback : Callback < ModifyResult < TSchema > >
1329
1329
) : void ;
1330
1330
findOneAndUpdate (
1331
1331
filter : Filter < TSchema > ,
1332
- update : UpdateQuery < TSchema > ,
1332
+ update : UpdateFilter < TSchema > ,
1333
1333
options : FindOneAndUpdateOptions
1334
1334
) : Promise < ModifyResult < TSchema > > ;
1335
1335
findOneAndUpdate (
1336
1336
filter : Filter < TSchema > ,
1337
- update : UpdateQuery < TSchema > ,
1337
+ update : UpdateFilter < TSchema > ,
1338
1338
options : FindOneAndUpdateOptions ,
1339
1339
callback : Callback < ModifyResult < TSchema > >
1340
1340
) : void ;
1341
1341
findOneAndUpdate (
1342
1342
filter : Filter < TSchema > ,
1343
- update : UpdateQuery < TSchema > ,
1343
+ update : UpdateFilter < TSchema > ,
1344
1344
options ?: FindOneAndUpdateOptions | Callback < ModifyResult < TSchema > > ,
1345
1345
callback ?: Callback < ModifyResult < TSchema > >
1346
1346
) : Promise < ModifyResult < TSchema > > | void {
@@ -1536,7 +1536,7 @@ export class Collection<TSchema extends Document = Document> {
1536
1536
*/
1537
1537
update (
1538
1538
selector : Filter < TSchema > ,
1539
- update : UpdateQuery < TSchema > ,
1539
+ update : UpdateFilter < TSchema > ,
1540
1540
options : UpdateOptions ,
1541
1541
callback : Callback < Document >
1542
1542
) : Promise < UpdateResult > | void {
0 commit comments