Skip to content

postgrelize / BeforeRestore

Variable: BeforeRestore ​

const BeforeRestore: ModelStaticMethodDecorator

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

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

Released under the MIT License.