我对如何做到这一点有点困惑
我的文件在保存之前我的文件保存后代码// error is either astring or an Error Object that has been created with new Error()document.saveliterals) result in the same behavior
我已经创建了这个模型,并且一直在使用这个模型。但现在我添加了@pre<Offer>("save",因为我想在保存之前对数据进行一些检查,并相应地调整这些值。experimentalDecorators are be enabled in tsconfig.json 我注意到的一件事是,当查看consoe日志时,hooks会在Model.create上调用,但不会在Model.updateOne如何让它们在更新时也起作用 我的班级 @pre<Offer>("save&qu