@@ -92,10 +92,10 @@ import type { CountOptions } from './operations/count';
9292import type {
9393 Filter ,
9494 TODO_NODE_3286 ,
95- UpdateQuery ,
95+ UpdateFilter ,
9696 WithId ,
9797 OptionalId ,
98- FlattenIfArray
98+ Flatten
9999} from './mongo_types' ;
100100
101101/** @public */
@@ -414,27 +414,27 @@ export class Collection<TSchema extends Document = Document> {
414414 */
415415 updateOne (
416416 filter : Filter < TSchema > ,
417- update : UpdateQuery < TSchema > | Partial < TSchema >
417+ update : UpdateFilter < TSchema > | Partial < TSchema >
418418 ) : Promise < UpdateResult | Document > ;
419419 updateOne (
420420 filter : Filter < TSchema > ,
421- update : UpdateQuery < TSchema > | Partial < TSchema > ,
421+ update : UpdateFilter < TSchema > | Partial < TSchema > ,
422422 callback : Callback < UpdateResult | Document >
423423 ) : void ;
424424 updateOne (
425425 filter : Filter < TSchema > ,
426- update : UpdateQuery < TSchema > | Partial < TSchema > ,
426+ update : UpdateFilter < TSchema > | Partial < TSchema > ,
427427 options : UpdateOptions
428428 ) : Promise < UpdateResult | Document > ;
429429 updateOne (
430430 filter : Filter < TSchema > ,
431- update : UpdateQuery < TSchema > | Partial < TSchema > ,
431+ update : UpdateFilter < TSchema > | Partial < TSchema > ,
432432 options : UpdateOptions ,
433433 callback : Callback < UpdateResult | Document >
434434 ) : void ;
435435 updateOne (
436436 filter : Filter < TSchema > ,
437- update : UpdateQuery < TSchema > | Partial < TSchema > ,
437+ update : UpdateFilter < TSchema > | Partial < TSchema > ,
438438 options ?: UpdateOptions | Callback < UpdateResult | Document > ,
439439 callback ?: Callback < UpdateResult | Document >
440440 ) : Promise < UpdateResult | Document > | void {
@@ -502,27 +502,27 @@ export class Collection<TSchema extends Document = Document> {
502502 */
503503 updateMany (
504504 filter : Filter < TSchema > ,
505- update : UpdateQuery < TSchema >
505+ update : UpdateFilter < TSchema >
506506 ) : Promise < UpdateResult | Document > ;
507507 updateMany (
508508 filter : Filter < TSchema > ,
509- update : UpdateQuery < TSchema > ,
509+ update : UpdateFilter < TSchema > ,
510510 callback : Callback < UpdateResult | Document >
511511 ) : void ;
512512 updateMany (
513513 filter : Filter < TSchema > ,
514- update : UpdateQuery < TSchema > ,
514+ update : UpdateFilter < TSchema > ,
515515 options : UpdateOptions
516516 ) : Promise < UpdateResult | Document > ;
517517 updateMany (
518518 filter : Filter < TSchema > ,
519- update : UpdateQuery < TSchema > ,
519+ update : UpdateFilter < TSchema > ,
520520 options : UpdateOptions ,
521521 callback : Callback < UpdateResult | Document >
522522 ) : void ;
523523 updateMany (
524524 filter : Filter < TSchema > ,
525- update : UpdateQuery < TSchema > ,
525+ update : UpdateFilter < TSchema > ,
526526 options ?: UpdateOptions | Callback < UpdateResult | Document > ,
527527 callback ?: Callback < UpdateResult | Document >
528528 ) : Promise < UpdateResult | Document > | void {
@@ -1116,30 +1116,30 @@ export class Collection<TSchema extends Document = Document> {
11161116 */
11171117 distinct < Key extends keyof WithId < TSchema > > (
11181118 key : Key
1119- ) : Promise < Array < FlattenIfArray < WithId < TSchema > [ Key ] > > > ;
1119+ ) : Promise < Array < Flatten < WithId < TSchema > [ Key ] > > > ;
11201120 distinct < Key extends keyof WithId < TSchema > > (
11211121 key : Key ,
1122- callback : Callback < Array < FlattenIfArray < WithId < TSchema > [ Key ] > > >
1122+ callback : Callback < Array < Flatten < WithId < TSchema > [ Key ] > > >
11231123 ) : void ;
11241124 distinct < Key extends keyof WithId < TSchema > > (
11251125 key : Key ,
11261126 filter : Filter < TSchema >
1127- ) : Promise < Array < FlattenIfArray < WithId < TSchema > [ Key ] > > > ;
1127+ ) : Promise < Array < Flatten < WithId < TSchema > [ Key ] > > > ;
11281128 distinct < Key extends keyof WithId < TSchema > > (
11291129 key : Key ,
11301130 filter : Filter < TSchema > ,
1131- callback : Callback < Array < FlattenIfArray < WithId < TSchema > [ Key ] > > >
1131+ callback : Callback < Array < Flatten < WithId < TSchema > [ Key ] > > >
11321132 ) : void ;
11331133 distinct < Key extends keyof WithId < TSchema > > (
11341134 key : Key ,
11351135 filter : Filter < TSchema > ,
11361136 options : DistinctOptions
1137- ) : Promise < Array < FlattenIfArray < WithId < TSchema > [ Key ] > > > ;
1137+ ) : Promise < Array < Flatten < WithId < TSchema > [ Key ] > > > ;
11381138 distinct < Key extends keyof WithId < TSchema > > (
11391139 key : Key ,
11401140 filter : Filter < TSchema > ,
11411141 options : DistinctOptions ,
1142- callback : Callback < Array < FlattenIfArray < WithId < TSchema > [ Key ] > > >
1142+ callback : Callback < Array < Flatten < WithId < TSchema > [ Key ] > > >
11431143 ) : void ;
11441144
11451145 // Embedded documents overload
@@ -1320,27 +1320,27 @@ export class Collection<TSchema extends Document = Document> {
13201320 */
13211321 findOneAndUpdate (
13221322 filter : Filter < TSchema > ,
1323- update : UpdateQuery < TSchema >
1323+ update : UpdateFilter < TSchema >
13241324 ) : Promise < ModifyResult < TSchema > > ;
13251325 findOneAndUpdate (
13261326 filter : Filter < TSchema > ,
1327- update : UpdateQuery < TSchema > ,
1327+ update : UpdateFilter < TSchema > ,
13281328 callback : Callback < ModifyResult < TSchema > >
13291329 ) : void ;
13301330 findOneAndUpdate (
13311331 filter : Filter < TSchema > ,
1332- update : UpdateQuery < TSchema > ,
1332+ update : UpdateFilter < TSchema > ,
13331333 options : FindOneAndUpdateOptions
13341334 ) : Promise < ModifyResult < TSchema > > ;
13351335 findOneAndUpdate (
13361336 filter : Filter < TSchema > ,
1337- update : UpdateQuery < TSchema > ,
1337+ update : UpdateFilter < TSchema > ,
13381338 options : FindOneAndUpdateOptions ,
13391339 callback : Callback < ModifyResult < TSchema > >
13401340 ) : void ;
13411341 findOneAndUpdate (
13421342 filter : Filter < TSchema > ,
1343- update : UpdateQuery < TSchema > ,
1343+ update : UpdateFilter < TSchema > ,
13441344 options ?: FindOneAndUpdateOptions | Callback < ModifyResult < TSchema > > ,
13451345 callback ?: Callback < ModifyResult < TSchema > >
13461346 ) : Promise < ModifyResult < TSchema > > | void {
@@ -1536,7 +1536,7 @@ export class Collection<TSchema extends Document = Document> {
15361536 */
15371537 update (
15381538 selector : Filter < TSchema > ,
1539- update : UpdateQuery < TSchema > ,
1539+ update : UpdateFilter < TSchema > ,
15401540 options : UpdateOptions ,
15411541 callback : Callback < Document >
15421542 ) : Promise < UpdateResult > | void {
0 commit comments