Skip to main content

HostHookClient

interface

Registers interceptors at runtime. Use this when the decision needs code. The declarative `hook.beforeAction` contribution covers the common case of gating an action behind a condition and gives the host a title to show the user.

interface HostHookClient

Import

import { HostHookClient } from '@modular/sdk/view';

Members1

beforeAction()
<K extends HostActionReference>(action: K, interceptor: HostActionInterceptor<HostActionIdOf<K>>) => Disposable

Runs `interceptor` before every dispatch of `action`: a host action id, a `command:` reference, or one of this mod's own `command(...)` values. Dispose to stop.