Skip to content

postgrelize / BeforeFindAfterOptions

Variable: BeforeFindAfterOptions ​

const BeforeFindAfterOptions: ModelStaticMethodDecorator

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

Registers the decorated static method as a beforeFindAfterOptions hook of the model (like Model.beforeFindAfterOptions). 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 {
  @BeforeFindAfterOptions
  static async onBeforeFindAfterOptions(options: unknown) {}
}

Released under the MIT License.