BeforeActionHookInput
interfaceWhat hook.beforeAction needs in order to declare an interception.
Import
import { BeforeActionHookInput } from '@modular/sdk';Members4
- action
HostActionReferenceThe action to intercept. Three shapes are legal, and they are the three things a hook can truthfully name: a host action id such as `workspace.file.write`; one of this mod's own `command(...)` values, which the host qualifies with the mod id; or `command:` plus the id of a command another mod or the host registers. A bare foreign id is not accepted, because nothing here can tell it apart from a typo.
- idoptional
stringStable hook id. Defaults to `beforeAction:<action>` with `:` written as `.`.
- title
stringHuman-readable label shown when the host asks the user about this hook.
- whenoptional
ConditionLimits the hook to when this condition holds. Always active when omitted.