What is ModifyResult and how to use it if its not in my code?

Viewed 91

this is the code line

const requestResetPassword: HydratedDocument<IResetPassword> = await ResetPassword.findOneAndUpdate(query, update, options).lean().exec();

and this is the error

Type 'ModifyResult<any>' is not assignable to type 'Document<any, any, IResetPassword> & IResetPassword & { _id: ObjectId; }'.
  Type 'ModifyResult<any>' is missing the following properties from type 'Document<any, any, IResetPassword>': $getAllSubdocs, $ignore, $isDefault, $isDeleted, and 46 more.ts(2322)

this is the entities of IResetPassword

export interface IResetPassword {
    email: string;
    uuid: string;
    isValidated: boolean;
    isReset: boolean;
    createdAt: string
}
0 Answers
Related