Skip to content

postgrelize / AfterBulkCreate

Variable: AfterBulkCreate ​

const AfterBulkCreate: ModelStaticMethodDecorator

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

Registers the decorated static method as an afterBulkCreate hook of the model (like Model.afterBulkCreate). 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 {
  @AfterBulkCreate
  static async onAfterBulkCreate(users: User[], options: unknown) {}
}

Released under the MIT License.