@@ -819,8 +819,8 @@ export class Collection<TSchema extends Document = Document> {
819
819
async findOneAndDelete (
820
820
filter : Filter < TSchema > ,
821
821
options : FindOneAndDeleteOptions
822
- ) : Promise < ModifyResult < TSchema > > ;
823
- async findOneAndDelete ( filter : Filter < TSchema > ) : Promise < ModifyResult < TSchema > > ;
822
+ ) : Promise < WithId < TSchema > | null > ;
823
+ async findOneAndDelete ( filter : Filter < TSchema > ) : Promise < WithId < TSchema > | null > ;
824
824
async findOneAndDelete (
825
825
filter : Filter < TSchema > ,
826
826
options ?: FindOneAndDeleteOptions
@@ -856,11 +856,11 @@ export class Collection<TSchema extends Document = Document> {
856
856
filter : Filter < TSchema > ,
857
857
replacement : WithoutId < TSchema > ,
858
858
options : FindOneAndReplaceOptions
859
- ) : Promise < ModifyResult < TSchema > > ;
859
+ ) : Promise < WithId < TSchema > | null > ;
860
860
async findOneAndReplace (
861
861
filter : Filter < TSchema > ,
862
862
replacement : WithoutId < TSchema >
863
- ) : Promise < ModifyResult < TSchema > > ;
863
+ ) : Promise < WithId < TSchema > | null > ;
864
864
async findOneAndReplace (
865
865
filter : Filter < TSchema > ,
866
866
replacement : WithoutId < TSchema > ,
@@ -898,11 +898,11 @@ export class Collection<TSchema extends Document = Document> {
898
898
filter : Filter < TSchema > ,
899
899
update : UpdateFilter < TSchema > ,
900
900
options : FindOneAndUpdateOptions
901
- ) : Promise < ModifyResult < TSchema > > ;
901
+ ) : Promise < WithId < TSchema > | null > ;
902
902
async findOneAndUpdate (
903
903
filter : Filter < TSchema > ,
904
904
update : UpdateFilter < TSchema >
905
- ) : Promise < ModifyResult < TSchema > > ;
905
+ ) : Promise < WithId < TSchema > | null > ;
906
906
async findOneAndUpdate (
907
907
filter : Filter < TSchema > ,
908
908
update : UpdateFilter < TSchema > ,
0 commit comments