Type alias GuardedTransitionV3<TContext, TEventData>

GuardedTransitionV3<TContext, TEventData>: {
    actions?: Action<TContext, TEventData>[];
    description?: string;
    guard: Guard<TContext, TEventData>;
    target: string;
}

Describes configurations for state transitions within the state machine that are contingent on specific conditions or guards. This type links guard conditions with transitions, actions, and optionally, descriptions for enhanced clarity.

Attributes:

  • guard: The condition under which the transition should occur, critical for controlling state flow based on dynamic context or events.
  • target: The identifier of the state to transition to if the guard condition is met, defining the path of the state machine.
  • actions: An optional list of actions to execute when the transition is triggered, enabling dynamic responses. Default is: withBasicActions()
  • description: An optional detailed description of the transition's purpose, aiding in understanding and documentation.

Type Parameters

  • TContext extends Record<string, any>

  • TEventData extends Record<string, any>

Type declaration

Typeparam

TContext The context type of the state machine, defining the data available during transitions.

Typeparam

TEventData Specifies the type of event data that triggers the guarded transition, providing context and conditions for the transition.

Generated using TypeDoc