JSSM, a JavaScript state machine - the FSM for FSL
    Preparing search index...

    Type Alias JssmHookDeclaration

    A parsed FSL boundary-hook declaration — the on <enter|exit> <subject> do '<action>'; form. event is the boundary crossing the hook listens for, subject is either a JssmGroupRef (a &Group) or a plain state label string, and action is the (unquoted) action name to run. The compiler routes a group subject into group_hooks and a state subject into state_hooks on JssmGenericConfig; runtime firing is a later task.

    import { parse } from 'jssm';
    parse("on enter &busy do 'log';")[0];
    // { key:'hook_decl', event:'enter',
    // subject:{ key:'group_ref', name:'busy' }, action:'log' }
    • JssmGroupRef
    • JssmGroupHooks
    type JssmHookDeclaration = {
        action: string;
        event: "enter" | "exit";
        key: "hook_decl";
        subject: JssmGroupRef | string;
    }
    Index
    action: string
    event: "enter" | "exit"
    key: "hook_decl"
    subject: JssmGroupRef | string