Returns true if any hook is registered for the event. Cheap check before building context.
(event: HookEvent)
| 35 | |
| 36 | /** Returns true if any hook is registered for the event. Cheap check before building context. */ |
| 37 | hasAny(event: HookEvent): boolean { |
| 38 | return (this.cfg[event] ?? []).length > 0; |
| 39 | } |
| 40 | |
| 41 | /** Returns all hooks for an event (after matcher filtering when toolName is supplied). */ |
| 42 | matching(event: HookEvent, toolName?: string): HookConfig[] { |
no outgoing calls
no test coverage detected