valtio-fsm
    Preparing search index...

    Interface MachineStore<TState, TContext>

    Represents the internal state store used by Valtio

    interface MachineStore<
        TState extends string,
        TContext extends Record<string, unknown>,
    > {
        context: TContext;
        history: TransitionHistoryItem<TState>[];
        historyEnabled: boolean;
        historySize: number;
        state: TState;
    }

    Type Parameters

    • TState extends string

      String literal type representing valid states

    • TContext extends Record<string, unknown>

      Context data type for the state machine

    Index

    Properties

    context: TContext

    Current context data

    List of historical transitions

    historyEnabled: boolean

    Whether transition history is being tracked

    historySize: number

    Maximum number of history items to store

    state: TState

    Current state