Skip to content

r.entityHook(...)

r.entityHook(type, entity, fn, options?) — like r.hook, but bound to an entity instead of individual handlers: postSave, preDelete, and postDelete fire on every matching write. The runtime API additionally accepts postQuery (fires for all query-handlers of the entity), but this pattern type only represents the three write-side hooks.


From packages/framework/src/engine/feature-ast/patterns.ts -> EntityHookPattern