prorm API Reference
    Preparing search index...

    Type Alias HookName

    HookName:
        | "beforeValidate"
        | "afterValidate"
        | "beforeCreate"
        | "afterCreate"
        | "beforeUpdate"
        | "afterUpdate"
        | "beforeDestroy"
        | "afterDestroy"
        | "beforeSave"
        | "afterSave"
        | "beforeUpsert"
        | "afterUpsert"
        | "beforeFind"
        | "afterFind"
        | "beforeCount"
        | "beforeBulkCreate"
        | "afterBulkCreate"
        | "beforeBulkUpdate"
        | "afterBulkUpdate"
        | "beforeBulkDestroy"
        | "afterBulkDestroy"

    Every model lifecycle hook the ORM fires.

    Typing hook names as a union rather than string makes a misspelled hook a compile error instead of a callback that silently never runs - which is exactly how eleven of these went unnoticed.