@@ -819,8 +819,8 @@ export class Collection<TSchema extends Document = Document> {
819819 async findOneAndDelete (
820820 filter : Filter < TSchema > ,
821821 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 > ;
824824 async findOneAndDelete (
825825 filter : Filter < TSchema > ,
826826 options ?: FindOneAndDeleteOptions
@@ -856,11 +856,11 @@ export class Collection<TSchema extends Document = Document> {
856856 filter : Filter < TSchema > ,
857857 replacement : WithoutId < TSchema > ,
858858 options : FindOneAndReplaceOptions
859- ) : Promise < ModifyResult < TSchema > > ;
859+ ) : Promise < WithId < TSchema > | null > ;
860860 async findOneAndReplace (
861861 filter : Filter < TSchema > ,
862862 replacement : WithoutId < TSchema >
863- ) : Promise < ModifyResult < TSchema > > ;
863+ ) : Promise < WithId < TSchema > | null > ;
864864 async findOneAndReplace (
865865 filter : Filter < TSchema > ,
866866 replacement : WithoutId < TSchema > ,
@@ -898,11 +898,11 @@ export class Collection<TSchema extends Document = Document> {
898898 filter : Filter < TSchema > ,
899899 update : UpdateFilter < TSchema > ,
900900 options : FindOneAndUpdateOptions
901- ) : Promise < ModifyResult < TSchema > > ;
901+ ) : Promise < WithId < TSchema > | null > ;
902902 async findOneAndUpdate (
903903 filter : Filter < TSchema > ,
904904 update : UpdateFilter < TSchema >
905- ) : Promise < ModifyResult < TSchema > > ;
905+ ) : Promise < WithId < TSchema > | null > ;
906906 async findOneAndUpdate (
907907 filter : Filter < TSchema > ,
908908 update : UpdateFilter < TSchema > ,
0 commit comments