Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Type Aliases

EverythingHookContext<mDT>: HookContext<mDT> & { hook_name: string }

Context object passed to "everything" hooks (EverythingHookHandler and PostEverythingHookHandler). Extends the usual HookContext with hook_name, which identifies which specific hook fired so a single handler can route on it.

Type Parameters

  • mDT

EverythingHookHandler<mDT>: ((hook_context: EverythingHookContext<mDT>) => HookResult<mDT>)

Type Parameters

  • mDT

Type declaration

FslDirection: typeof FslDirections[number]

String literal type of the four supported FSL flow directions. This is the type of the flow config key on a machine.

FslTheme: typeof FslThemes[number]

String literal type of the built-in theme names. This is the element type of the theme config key (which accepts an array so that themes can be layered).

HookComplexResult<mDT>: { data?: mDT; next_data?: mDT; pass: boolean; state?: StateType }

Richer hook return value used when a hook needs to do more than just accept or veto a transition. pass is the required accept/veto flag (kept non-optional so that returning a stray object doesn't accidentally veto everything). The optional state overrides the destination state, data overrides the data observed by other hooks in the same chain, and next_data overrides the data committed after the transition.

Type Parameters

  • mDT

Type declaration

  • Optional data?: mDT
  • Optional next_data?: mDT
  • pass: boolean
  • Optional state?: StateType
HookContext<mDT>: { data: mDT; next_data: mDT }

Context object passed to every HookHandler. data is the data payload as it stands before the transition, and next_data is the payload that will be committed if the transition is accepted — handlers may inspect or mutate the latter via a HookComplexResult return value.

Type Parameters

  • mDT

Type declaration

  • data: mDT
  • next_data: mDT

Discriminated union of every kind of hook registration jssm understands, pre-transition and post-transition. The kind field selects the variant; remaining fields describe which transitions / states / actions the hook is bound to and supply the HookHandler or PostHookHandler to invoke.

Pre-transition variants ('hook', 'named', 'standard transition', 'main transition', 'forced transition', 'any transition', 'global action', 'any action', 'entry', 'exit', 'after') may return a falsy value to veto a transition. Post-transition variants ('post *') cannot veto and are invoked only after a successful transition.

Type Parameters

  • mDT

HookHandler<mDT>: ((hook_context: HookContext<mDT>) => HookResult<mDT>)

Type Parameters

  • mDT

Type declaration

HookResult<mDT>: boolean | undefined | void | HookComplexResult<mDT>

Return value from a HookHandler. May be a plain boolean to accept (true/undefined/void) or veto (false) the transition, or a HookComplexResult that additionally rewrites the next state and/or the next data payload.

Type Parameters

  • mDT

JssmActionEventDetail<mDT>: { action: StateType; data: mDT; from: StateType; next_data?: mDT; to?: StateType }

Detail payload fired with an action event. Fires when an action is attempted, before transition validation runs.

Type Parameters

  • mDT

Type declaration

JssmAllowsOverride: boolean | undefined

Tristate flag for whether a property may be overridden at runtime. true permits overrides, false forbids them, and undefined defers the decision to the surrounding configuration's default.

JssmArrow: "->" | "<-" | "<->" | "<=->" | "<~->" | "=>" | "<=" | "<=>" | "<-=>" | "<~=>" | "~>" | "<~" | "<~>" | "<-~>" | "<=~>"

The set of ASCII arrow tokens recognized by the FSL grammar. Each arrow encodes a direction (one-way left/right, or two-way) and a "kind" for each direction (- legal, = main path, ~ forced-only). See the Language Reference docs for the full semantic table.

JssmArrowDirection: "left" | "right" | "both"

Direction polarity of an arrow: pointing only 'left', only 'right', or 'both' (a bidirectional arrow).

JssmArrowKind: "none" | "legal" | "main" | "forced"

Semantic category of an arrow's transition. 'legal' is a normal transition, 'main' is part of the machine's primary path, 'forced' may only be taken via Machine.force_transition, and 'none' means no transition exists in that direction.

JssmBaseTheme: { action: undefined; active: JssmStateConfig; active_end: JssmStateConfig; active_hooked: JssmStateConfig; active_start: JssmStateConfig; active_terminal: JssmStateConfig; end: JssmStateConfig; forced: undefined; graph: undefined; hooked: JssmStateConfig; legal: undefined; main: undefined; name: string; start: JssmStateConfig; state: JssmStateConfig; terminal: JssmStateConfig; title: undefined }

Complete shape of a jssm-viz theme. A theme provides a style block for each kind of state (state, hooked, start, end, terminal) as well as a matching active_* variant used while that state is current.

The graph, legal, main, forced, action, and title slots are reserved for future use and currently typed as undefined.

Most user-defined themes should be typed as JssmTheme (the Partial of this) so that omitted fields fall back to the base theme.

Type declaration

JssmColor: string

A color value accepted by jssm-viz for state and arrow styling. Currently any string, validated downstream by Graphviz / the named-colors list. Intended to be narrowed to #RRGGBB / #RRGGBBAA and CSS named colors in a future release.

JssmCompileRule<StateType>: { agg_as: string; val: any }

Internal compiler intermediate: a single aggregated rule produced while folding a parse tree into a machine configuration. Not intended for end-user code.

internal

Type Parameters

  • StateType

Type declaration

  • agg_as: string
  • val: any
JssmCompileSe<StateType, mDT>: { kind: JssmArrow; l_action?: StateType; l_after?: number; l_probability: number; r_action?: StateType; r_after?: number; r_probability: number; se?: JssmCompileSe<StateType, mDT>; to: StateType }

Internal compiler intermediate: one link in a chained transition expression (an "s-expression" segment). Carries both directions of an arrow with optional per-direction action labels, probabilities, and after-times. The recursive se field allows the parser to chain arrows of the form A -> B -> C. Not intended for end-user code.

internal

Type Parameters

  • StateType

  • mDT

Type declaration

  • kind: JssmArrow
  • Optional l_action?: StateType
  • Optional l_after?: number
  • l_probability: number
  • Optional r_action?: StateType
  • Optional r_after?: number
  • r_probability: number
  • Optional se?: JssmCompileSe<StateType, mDT>
  • to: StateType
JssmCompileSeStart<StateType, DataType>: { default_value?: any; from: StateType; key: string; name?: string; required?: boolean; se: JssmCompileSe<StateType, DataType>; state?: string; value?: string | number }

Internal compiler intermediate: the root of a chained transition expression, anchored at a from state. Also doubles as the carrier for non-transition rules (state declarations, property definitions, machine metadata) via its key/value/name/state fields. Not intended for end-user code.

internal

Type Parameters

  • StateType

  • DataType

Type declaration

  • Optional default_value?: any
  • from: StateType
  • key: string
  • Optional name?: string
  • Optional required?: boolean
  • se: JssmCompileSe<StateType, DataType>
  • Optional state?: string
  • Optional value?: string | number
JssmCompleteEventDetail<mDT>: { data: mDT; state: StateType }

Detail payload fired with a complete event. Indicates that the machine has reached a FSL complete state.

Type Parameters

  • mDT

Type declaration

JssmDataChangeEventDetail<mDT>: { action?: StateType; cause: "transition" | "override"; from?: StateType; new_data: mDT; old_data: mDT; to?: StateType }

Detail payload fired with a data-change event. Fires whenever the machine's data payload is replaced. old_data is the value before the change; new_data is the value after.

Type Parameters

  • mDT

Type declaration

JssmEntryEventDetail<mDT>: { action?: StateType; data: mDT; from?: StateType; state: StateType }

Detail payload fired with an entry event. state is the entered state. from is the predecessor state, if any. action is the action that drove the entry, if any.

Type Parameters

  • mDT

Type declaration

JssmErrorEventDetail: { error: unknown; handler: Function; source_detail: unknown; source_event: JssmEventName }

Detail payload fired with an error event. Wraps an exception caught while running an event handler; source_event and source_detail identify the event whose handler threw, and handler is the offending function so consumers can correlate / blame.

Type declaration

  • error: unknown
  • handler: Function
  • source_detail: unknown
  • source_event: JssmEventName
JssmErrorExtendedInfo: { requested_state?: StateType }

Extra diagnostic information attached to a JssmError when it carries machine-relative context — most often the state name a caller asked about when the error was raised.

Type declaration

JssmEventDetailMap<mDT>: { action: JssmActionEventDetail<mDT>; complete: JssmCompleteEventDetail<mDT>; data-change: JssmDataChangeEventDetail<mDT>; entry: JssmEntryEventDetail<mDT>; error: JssmErrorEventDetail; exit: JssmExitEventDetail<mDT>; hook-registration: JssmHookLifecycleEventDetail<mDT>; hook-removal: JssmHookLifecycleEventDetail<mDT>; override: JssmOverrideEventDetail<mDT>; rejection: JssmRejectionEventDetail<mDT>; terminal: JssmTerminalEventDetail<mDT>; timeout: JssmTimeoutEventDetail; transition: JssmTransitionEventDetail<mDT> }

Mapped type from JssmEventName to the corresponding detail payload. Drives the discriminated-union typing of Machine.on, so e.action and friends only exist where they're meaningful.

Type Parameters

  • mDT

Type declaration

JssmEventFilter<mDT, Ev>: JssmEventFilterMap<mDT>[Ev]

Per-event filter object (as passed to Machine.on). Use JssmEventDetailMap<mDT>[Ev] to find the matching detail type.

Type Parameters

  • mDT

    The type of the machine data member.

  • Ev extends JssmEventName

    The event name.

JssmEventFilterMap<mDT>: { action: Record<string, never>; complete: Record<string, never>; data-change: Record<string, never>; entry: { state?: StateType }; error: Record<string, never>; exit: { state?: StateType }; hook-registration: Record<string, never>; hook-removal: Record<string, never>; override: Record<string, never>; rejection: Record<string, never>; terminal: Record<string, never>; timeout: Record<string, never>; transition: { from?: StateType; to?: StateType } }

Filter accepted by Machine.on / Machine.once for an individual event name. Only events whose detail key matches every filter entry fire the handler. Events that don't list a filter key in v1 take no filter properties.

Type Parameters

  • mDT

Type declaration

JssmEventHandler<mDT, Ev>: ((detail: JssmEventDetailMap<mDT>[Ev]) => void)

Type Parameters

  • mDT

    The type of the machine data member.

  • Ev extends JssmEventName

    The event name.

Type declaration

    • Per-event handler signature. Receives a detail object typed by event name, so e.action (etc.) only exist where they're meaningful.

      Parameters

      Returns void

JssmEventName: "transition" | "rejection" | "action" | "entry" | "exit" | "terminal" | "complete" | "error" | "data-change" | "override" | "timeout" | "hook-registration" | "hook-removal"

All event names that Machine.on accepts. These are observation events fired by the machine in addition to (not in place of) the hook system. Hooks intercept; events observe.

see

Machine.on

JssmExitEventDetail<mDT>: { action?: StateType; data: mDT; state: StateType; to?: StateType }

Detail payload fired with an exit event. state is the exited state. to is the next state, if any. action is the action that drove the exit, if any.

Type Parameters

  • mDT

Type declaration

JssmGenericConfig<StateType, DataType>: { actions?: JssmPermittedOpt; allow_force?: false; allow_islands?: false; allows_override?: JssmAllowsOverride; arrange_declaration?: StateType[][]; arrange_end_declaration?: StateType[][]; arrange_start_declaration?: StateType[][]; auto_api?: boolean | string; check?: JssmStatePermitterMaybeArray<DataType>; complete?: StateType[]; config_allows_override?: JssmAllowsOverride; data?: DataType; default_active_state_config?: JssmStateStyleKeyList; default_end_state_config?: JssmStateStyleKeyList; default_hooked_state_config?: JssmStateStyleKeyList; default_start_state_config?: JssmStateStyleKeyList; default_state_config?: JssmStateStyleKeyList; default_terminal_state_config?: JssmStateStyleKeyList; dot_preamble?: string; end_states?: StateType[]; flow?: FslDirection; fsl_version?: string; graph_layout?: JssmLayout; history?: number; initial_state?: StateType; instance_name?: string; machine_author?: string | string[]; machine_comment?: string; machine_contributor?: string | string[]; machine_definition?: string; machine_language?: string; machine_license?: string; machine_name?: string; machine_version?: string; max_exits?: number; min_exits?: number; name?: string; nodes?: StateType[]; property_definition?: JssmPropertyDefinition[]; rng_seed?: number; simplify_bidi?: boolean; start_states: StateType[]; start_states_no_enforce?: boolean; state_declaration?: <internal>.Object[]; state_property?: JssmPropertyDefinition[]; theme?: FslTheme[]; transitions: JssmTransitions<StateType, DataType>; clear_timeout_source?: any; time_source?: any; timeout_source?: any }

Full configuration object accepted by the Machine constructor and by {@link from}. Carries the transition list and the optional knobs governing layout, theming, history, start/end states, property definitions, machine metadata (author, license, version, ...) and the runtime hook surfaces (time_source, timeout_source, ...).

Most users never construct one of these directly — the sm tagged template literal and {@link from} produce one from FSL source.

Type Parameters

  • StateType

    The state-name type (usually string).

  • DataType

    The user-supplied data payload type (mDT).

Type declaration

  • Optional actions?: JssmPermittedOpt
  • Optional allow_force?: false
  • Optional allow_islands?: false
  • Optional allows_override?: JssmAllowsOverride
  • Optional arrange_declaration?: StateType[][]
  • Optional arrange_end_declaration?: StateType[][]
  • Optional arrange_start_declaration?: StateType[][]
  • Optional auto_api?: boolean | string
  • Optional check?: JssmStatePermitterMaybeArray<DataType>
  • Optional complete?: StateType[]
  • Optional config_allows_override?: JssmAllowsOverride
  • Optional data?: DataType
  • Optional default_active_state_config?: JssmStateStyleKeyList
  • Optional default_end_state_config?: JssmStateStyleKeyList
  • Optional default_hooked_state_config?: JssmStateStyleKeyList
  • Optional default_start_state_config?: JssmStateStyleKeyList
  • Optional default_state_config?: JssmStateStyleKeyList
  • Optional default_terminal_state_config?: JssmStateStyleKeyList
  • Optional dot_preamble?: string
  • Optional end_states?: StateType[]
  • Optional flow?: FslDirection
  • Optional fsl_version?: string
  • Optional graph_layout?: JssmLayout
  • Optional history?: number
  • Optional initial_state?: StateType
  • Optional instance_name?: string
  • Optional machine_author?: string | string[]
  • Optional machine_comment?: string
  • Optional machine_contributor?: string | string[]
  • Optional machine_definition?: string
  • Optional machine_language?: string
  • Optional machine_license?: string
  • Optional machine_name?: string
  • Optional machine_version?: string
  • Optional max_exits?: number
  • Optional min_exits?: number
  • Optional name?: string
  • Optional nodes?: StateType[]
  • Optional property_definition?: JssmPropertyDefinition[]
  • Optional rng_seed?: number
  • Optional simplify_bidi?: boolean
  • start_states: StateType[]
  • Optional start_states_no_enforce?: boolean
  • Optional state_declaration?: <internal>.Object[]
  • Optional state_property?: JssmPropertyDefinition[]
  • Optional theme?: FslTheme[]
  • transitions: JssmTransitions<StateType, DataType>
  • clear_timeout_source?:function
    • clear_timeout_source(number: any): void
  • time_source?:function
    • time_source(): number
  • timeout_source?:function
    • timeout_source(Function: any, number: any): number
JssmGenericMachine<DataType>: { allow_empty?: boolean; allow_force?: boolean; allow_islands?: boolean; check?: JssmStatePermitterMaybeArray<DataType>; data?: DataType; keep_history?: boolean | number; max_transitions?: number; min_transitions?: number; name?: string; nodes?: StateType[]; state: StateType; transitions: JssmTransitions<StateType, DataType> }

Minimal machine description used internally and accepted by some lower-level constructors. Most callers should use the richer JssmGenericConfig instead.

Type Parameters

  • DataType

Type declaration

  • Optional allow_empty?: boolean
  • Optional allow_force?: boolean
  • Optional allow_islands?: boolean
  • Optional check?: JssmStatePermitterMaybeArray<DataType>
  • Optional data?: DataType
  • Optional keep_history?: boolean | number
  • Optional max_transitions?: number
  • Optional min_transitions?: number
  • Optional name?: string
  • Optional nodes?: StateType[]
  • state: StateType
  • transitions: JssmTransitions<StateType, DataType>
JssmGenericState: { complete: boolean; from: StateType[]; name: StateType; to: StateType[] }

Topology record for one node in a compiled machine: its name, the set of states it can be reached from, the set of states it can transition to, and whether reaching it constitutes "completing" the machine.

Type declaration

JssmHistory<mDT>: circular_buffer<[StateType, mDT]>

Bounded history of recently-visited states paired with the data payload observed in each. Backed by circular_buffer_js, so the oldest entry is dropped silently once the configured capacity is exceeded.

Type Parameters

  • mDT

JssmHookLifecycleEventDetail<mDT>: { description: HookDescription<mDT> }

Detail payload fired with hook-registration and hook-removal events. Mirrors the HookDescription so inspector tools can mirror the current hook set.

Type Parameters

  • mDT

Type declaration

JssmLayout: "dot" | "circo" | "twopi" | "fdp" | "neato"

Graphviz layout engine selector. Controls how jssm-viz lays out the rendered diagram; 'dot' is the default and most useful for state machines. See the Graphviz documentation for the differences.

JssmMachineInternalState<DataType>: { actions: Map<StateType, Map<StateType, number>>; edge_map: Map<StateType, Map<StateType, number>>; edges: JssmTransition<StateType, DataType>[]; internal_state_impl_version: 1; named_transitions: Map<StateType, number>; reverse_actions: Map<StateType, Map<StateType, number>>; state: StateType; states: Map<StateType, JssmGenericState> }

The full internal bookkeeping snapshot of a Machine, exposed for advanced introspection. Contains the current state, the state map, the edge map and reverse-action map, and the original edge list. The internal_state_impl_version field exists so that consumers can detect shape changes if this representation evolves.

Type Parameters

  • DataType

Type declaration

JssmOverrideEventDetail<mDT>: { from: StateType; new_data?: mDT; old_data: mDT; to: StateType }

Detail payload fired with an override event. Distinguishes a forced state replacement from a normal transition.

Type Parameters

  • mDT

Type declaration

JssmParseFunctionType<StateType, mDT>: ((string: any) => JssmParseTree<StateType, mDT>)

Type Parameters

  • StateType

  • mDT

Type declaration

    • Signature of an FSL parse function: takes a source string and returns a JssmParseTree. Used to type the parser export so consumers can swap in alternative parser implementations.

      Parameters

      • string: any

      Returns JssmParseTree<StateType, mDT>

JssmParseTree<StateType, mDT>: JssmCompileSeStart<StateType, mDT>[]

The output shape of the FSL parser: a flat array of JssmCompileSeStart entries, one per top-level rule in the source. Consumed by the compiler to build a machine configuration.

internal

Type Parameters

  • StateType

  • mDT

JssmPermitted: "required" | "disallowed"

Two-state policy flag: a feature is either 'required' or 'disallowed'. Used by machine configuration where the option must take a definite stance.

JssmPermittedOpt: "required" | "disallowed" | "optional"

Three-state policy flag: 'required', 'disallowed', or 'optional'. Used by machine configuration where a default-permissive middle ground is meaningful (for example, the actions config key).

JssmPropertyDefinition: { default_value?: any; name: string; required?: boolean }

Declaration of a named property that a machine's states may carry. Set required: true to force every state to define the property, or provide default_value to fall back when the state does not specify it.

Type declaration

  • Optional default_value?: any
  • name: string
  • Optional required?: boolean
JssmRejectionEventDetail<mDT>: { action?: StateType; data: mDT; forced: boolean; from: StateType; hook_name?: string; next_data?: mDT; reason: "invalid" | "hook"; to: StateType }

Detail payload fired with a rejection event. Carries the resolved source and target plus an indication of who rejected the transition and why. reason is 'invalid' when no edge existed, 'hook' when a hook handler vetoed; hook_name is set when reason is 'hook'.

Type Parameters

  • mDT

Type declaration

  • Optional action?: StateType
  • data: mDT
  • forced: boolean
  • from: StateType
  • Optional hook_name?: string
  • Optional next_data?: mDT
  • reason: "invalid" | "hook"
  • to: StateType

Discriminated union representing the outcome of an operation: either success, failure (with an error), or incomplete. Used as the return shape for operations that may need to report partial progress.

JssmRng: (() => number)

Type declaration

    • (): number
    • Pluggable random-number-generator function shape. Must return a value in [0, 1) exactly as Math.random does. Supplied via the rng_seed-aware machine configuration so that stochastic models can be made reproducible.

      Returns number

JssmSerialization<DataType>: { comment?: string; data: DataType; history: [string, DataType][]; history_capacity: number; jssm_version: string; state: StateType; timestamp: number }

Persistable snapshot of a Machine produced by Machine.serialize and consumed by deserialize. Carries the current state, the associated machine data, the recent history (subject to the configured capacity), and metadata to detect version-skew on rehydration.

Type Parameters

  • DataType

    The type of the user-supplied data payload (mDT).

Type declaration

  • Optional comment?: string
  • data: DataType
  • history: [string, DataType][]
  • history_capacity: number
  • jssm_version: string
  • state: StateType
  • timestamp: number
JssmShape: "box" | "polygon" | "ellipse" | "oval" | "circle" | "point" | "egg" | "triangle" | "plaintext" | "plain" | "diamond" | "trapezium" | "parallelogram" | "house" | "pentagon" | "hexagon" | "septagon" | "octagon" | "doublecircle" | "doubleoctagon" | "tripleoctagon" | "invtriangle" | "invtrapezium" | "invhouse" | "Mdiamond" | "Msquare" | "Mcircle" | "rect" | "rectangle" | "square" | "star" | "none" | "underline" | "cylinder" | "note" | "tab" | "folder" | "box3d" | "component" | "promoter" | "cds" | "terminator" | "utr" | "primersite" | "restrictionsite" | "fivepoverhang" | "threepoverhang" | "noverhang" | "assembly" | "signature" | "insulator" | "ribosite" | "rnastab" | "proteasesite" | "proteinstab" | "rpromoter" | "rarrow" | "larrow" | "lpromoter" | "record"

A type teaching Typescript the various supported shapes for nodes, mostly inherited from GraphViz

JssmStateConfig: Partial<JssmStateDeclaration>

A loosened version of JssmStateDeclaration where every field is optional. Used as the value type for theme entries and for default state configuration where most fields will be inherited or merged.

JssmStateDeclaration: { backgroundColor?: JssmColor; borderColor?: JssmColor; color?: JssmColor; corners?: JssmCorner; declarations: JssmStateDeclarationRule[]; image?: string; lineStyle?: JssmLineStyle; property?: { name: string; value: unknown }; shape?: JssmShape; state: StateType; stateLabel?: string; textColor?: JssmColor; url?: string }

The fully-condensed declaration for a single state, including its raw rule list (declarations) and the well-known styling fields jssm-viz understands. Returned by Machine.state_declaration.

Type declaration

JssmStateDeclarationRule: { key: string; name?: string; value: any }

A single key/value pair from an FSL state X: { ... }; block, in the raw form produced by the parser before being condensed into a JssmStateDeclaration.

Type declaration

  • key: string
  • Optional name?: string
  • value: any

Tagged union of all individual style key/value pairs that may appear in a state's style configuration. The key discriminator selects which member, and the value is typed accordingly.

JssmStateStyleKeyList: JssmStateStyleKey[]

An ordered list of JssmStateStyleKey entries. Used by the default_*_state_config machine config options to provide a fallback style stack.

JssmTerminalEventDetail<mDT>: { data: mDT; state: StateType }

Detail payload fired with a terminal event. Indicates that the machine has reached a state with no outgoing edges.

Type Parameters

  • mDT

Type declaration

A user-supplied theme. Identical in shape to JssmBaseTheme, but every field is optional so themes can be layered: omitted slots fall through to the underlying base theme.

JssmTimeoutEventDetail: { after_time: number; from: StateType; to: StateType }

Detail payload fired with a timeout event. Fires when a configured after clause causes an automatic transition.

Type declaration

JssmTransition<StateType, DataType>: { action?: StateType; after_time?: number; check?: JssmTransitionPermitterMaybeArray<DataType>; forced_only: boolean; from: StateType; kind: JssmArrowKind; main_path: boolean; name?: StateType; probability?: number; se?: JssmCompileSe<StateType, DataType>; to: StateType }

A single directed transition (edge) within a state machine. Captures both the topology (from / to), the FSL semantics (kind, forced_only, main_path), and any optional metadata such as a per-edge name, an action label, a guard check, a transition probability for stochastic models, and an after_time for timed transitions.

Type Parameters

  • StateType

    The state-name type (usually string).

  • DataType

    The machine's data payload type (mDT).

Type declaration

  • Optional action?: StateType
  • Optional after_time?: number
  • Optional check?: JssmTransitionPermitterMaybeArray<DataType>
  • forced_only: boolean
  • from: StateType
  • kind: JssmArrowKind
  • main_path: boolean
  • Optional name?: StateType
  • Optional probability?: number
  • Optional se?: JssmCompileSe<StateType, DataType>
  • to: StateType
JssmTransitionEventDetail<mDT>: { action?: StateType; data: mDT; forced: boolean; from: StateType; next_data?: mDT; to: StateType; trans_type: string | undefined }

Detail payload fired with a transition event. Carries the resolved source and target, the action name (if the transition was driven by an action), the data observed before and after the change, the edge kind, and whether the call was a forced transition.

Type Parameters

  • mDT

Type declaration

JssmTransitionList: { entrances: StateType[]; exits: StateType[] }

The set of states that can immediately precede or follow a given state. Returned by jssm helpers that report a state's connectivity in the graph.

Type declaration

JssmTransitionRule: StateType | JssmTransitionCycle

An entry produced while parsing a transition rule: either a literal state name (StateType) or a JssmTransitionCycle marker.

JssmTransitions<StateType, DataType>: JssmTransition<StateType, DataType>[]

A list of JssmTransitions — the edge set of a machine.

Type Parameters

  • StateType

  • DataType

JssmUnsubscribe: (() => void)

Type declaration

    • (): void
    • Function returned by Machine.on and Machine.once that removes the subscription. Calling it more than once is a no-op.

      Returns void

PostEverythingHookHandler<mDT>: ((hook_context: EverythingHookContext<mDT>) => void)

Type Parameters

  • mDT

Type declaration

Variables

FslDirections: readonly ["up", "right", "down", "left"] = ...

Runtime-iterable list of valid flow directions for FSL diagrams. Use this when you need to enumerate directions; for the type itself see FslDirection.

FslThemes: readonly ["default", "ocean", "modern", "plain", "bold"] = ...

Runtime-iterable list of the built-in theme names that ship with jssm-viz. Use this when you need to enumerate themes; for the type itself see FslTheme.

Generated using TypeDoc