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

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

    FsmEntryAction: (
        params: {
            context: Context;
            fsm: FsmActionApi<Events>;
            meta: Readonly<
                | {
                    cause: "transition";
                    event: E;
                    fromState: State;
                    payload: Readonly<PayloadOf<Events, E>>;
                }
                | {
                    cause: "initial";
                    event: undefined;
                    fromState: undefined;
                    payload: undefined;
                },
            >;
            state: State;
        },
    ) => void

    Entry action callback.

    Runs when a state is entered.

    Type Parameters

    Type Declaration

      • (
            params: {
                context: Context;
                fsm: FsmActionApi<Events>;
                meta: Readonly<
                    | {
                        cause: "transition";
                        event: E;
                        fromState: State;
                        payload: Readonly<PayloadOf<Events, E>>;
                    }
                    | {
                        cause: "initial";
                        event: undefined;
                        fromState: undefined;
                        payload: undefined;
                    },
                >;
                state: State;
            },
        ): void
      • Parameters

        • params: {
              context: Context;
              fsm: FsmActionApi<Events>;
              meta: Readonly<
                  | {
                      cause: "transition";
                      event: E;
                      fromState: State;
                      payload: Readonly<PayloadOf<Events, E>>;
                  }
                  | {
                      cause: "initial";
                      event: undefined;
                      fromState: undefined;
                      payload: undefined;
                  },
              >;
              state: State;
          }

        Returns void