@thingts/fsm-engine - v1.2.1
    Preparing search index...

    Type Alias FsmTransitionAction<State, Events, E, Context>

    FsmTransitionAction: (
        params: {
            context: Context;
            event: E;
            fsm: FsmActionApi<Events>;
            meta: Readonly<
                {
                    fromState: State;
                    toState: State;
                    transitionKind: "external"
                    | "internal";
                },
            >;
            payload: Readonly<PayloadOf<Events, E>>;
        },
    ) => void

    Transition action callback.

    Runs when a transition fires.

    For internal transitions, meta.toState is the same as meta.fromState.

    Type Parameters

    Type Declaration

      • (
            params: {
                context: Context;
                event: E;
                fsm: FsmActionApi<Events>;
                meta: Readonly<
                    {
                        fromState: State;
                        toState: State;
                        transitionKind: "external"
                        | "internal";
                    },
                >;
                payload: Readonly<PayloadOf<Events, E>>;
            },
        ): void
      • Parameters

        • params: {
              context: Context;
              event: E;
              fsm: FsmActionApi<Events>;
              meta: Readonly<
                  {
                      fromState: State;
                      toState: State;
                      transitionKind: "external"
                      | "internal";
                  },
              >;
              payload: Readonly<PayloadOf<Events, E>>;
          }

        Returns void