postgrelize / BeforeUpdate
Variable: BeforeUpdate ​
constBeforeUpdate:ModelStaticMethodDecorator
Defined in: src/decorators/hook-decorators.ts:92
Registers the decorated static method as a beforeUpdate hook of the model (like Model.beforeUpdate). The method receives the hook arguments; static methods only. Registered when sequelize.addModels applies the class. Accepts the TC39 and the legacy experimentalDecorators call signature.
Example ​
ts
class User extends Model {
@BeforeUpdate
static async onBeforeUpdate(user: User, options: unknown) {}
}