@@ -378,12 +378,12 @@ export class Collection<T extends Document> implements MongoCollection<T> {
378
378
): Promise<WithId <T> | null>;
379
379
findOneAndDelete(filter: Filter<T >): Promise<WithId <T> | null>;
380
380
findOneAndDelete(
381
- _filter : unknown,
381
+ filter : unknown,
382
382
_options?: unknown,
383
- ):
384
- | Promise< import ( ' mongodb ' ).WithId<T> | null>
385
- | Promise< import ( ' mongodb ' ).ModifyResult<T>> {
386
- throw new Error('Method not implemented.') ;
383
+ ): Promise< WithId <T> | null | ModifyResult< T >> {
384
+ return this.collection.findOneAndDelete(
385
+ filter as PongoFilter< T >,
386
+ ) as Promise< WithId <T> | null> ;
387
387
}
388
388
findOneAndReplace(
389
389
filter: Filter<T >,
@@ -405,13 +405,14 @@ export class Collection<T extends Document> implements MongoCollection<T> {
405
405
replacement: WithoutId<T >,
406
406
): Promise<WithId <T> | null>;
407
407
findOneAndReplace(
408
- _filter : unknown,
409
- _replacement : unknown,
408
+ filter : unknown,
409
+ replacement : unknown,
410
410
_options?: unknown,
411
- ):
412
- | Promise<import (' mongodb' ).WithId<T> | null>
413
- | Promise<import (' mongodb' ).ModifyResult<T>> {
414
- throw new Error('Method not implemented.');
411
+ ): Promise<WithId <T> | null | ModifyResult<T >> {
412
+ return this.collection.findOneAndReplace(
413
+ filter as PongoFilter<T >,
414
+ replacement as WithoutId<T >,
415
+ ) as Promise<WithId <T> | null>;
415
416
}
416
417
findOneAndUpdate(
417
418
filter: Filter<T >,
@@ -433,13 +434,14 @@ export class Collection<T extends Document> implements MongoCollection<T> {
433
434
update: UpdateFilter<T >,
434
435
): Promise<WithId <T> | null>;
435
436
findOneAndUpdate(
436
- _filter : unknown,
437
- _update : unknown,
437
+ filter : unknown,
438
+ update : unknown,
438
439
_options?: unknown,
439
- ):
440
- | Promise<import (' mongodb' ).WithId<T> | null>
441
- | Promise<import (' mongodb' ).ModifyResult<T>> {
442
- throw new Error('Method not implemented.');
440
+ ): Promise<WithId <T> | null | ModifyResult<T >> {
441
+ return this.collection.findOneAndUpdate(
442
+ filter as PongoFilter<T >,
443
+ update as PongoUpdate<T >,
444
+ ) as Promise<WithId <T> | null>;
443
445
}
444
446
aggregate<T extends Document = Document>(
445
447
_pipeline?: Document[] | undefined,
0 commit comments