Skip to content

postgrelize / AfterUpdate

Variable: AfterUpdate ​

const AfterUpdate: ModelStaticMethodDecorator

Defined in: src/decorators/hook-decorators.ts:107

Registers the decorated static method as an afterUpdate hook of the model (like Model.afterUpdate). 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 {
  @AfterUpdate
  static async onAfterUpdate(user: User, options: unknown) {}
}

Released under the MIT License.