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

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

    FsmGuard: (
        params: {
            context: Readonly<Context>;
            event: E;
            meta: Readonly<{ state: State; transitionKind: "external" | "internal" }>;
            payload: Readonly<PayloadOf<Events, E>>;
        },
    ) => boolean

    Guard callback.

    Predicate to determine whether the guarded transition is eligible to fire.

    Type Parameters

    Type Declaration

      • (
            params: {
                context: Readonly<Context>;
                event: E;
                meta: Readonly<{ state: State; transitionKind: "external" | "internal" }>;
                payload: Readonly<PayloadOf<Events, E>>;
            },
        ): boolean
      • Parameters

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

        Returns boolean