@mudssky/jsutils
    Preparing search index...

    Interface MachineConfig<TValue, TContext, TEvent>

    状态机配置对象。

    interface MachineConfig<
        TValue extends string,
        TContext,
        TEvent extends { type: string },
    > {
        context: TContext;
        initial: TValue;
        states: Record<TValue, MachineStateConfig<TValue, TContext, TEvent>>;
    }

    Type Parameters

    • TValue extends string

      状态值字面量联合类型

    • TContext

      上下文对象类型

    • TEvent extends { type: string }

      事件联合类型

    Index

    Properties

    context: TContext
    initial: TValue