I try to create method hashPassword for user schema.
schema.method("hashPassword", function (): void { const salt = bcrypt.genSaltSync(10); cons