@mudssky/jsutils
    Preparing search index...

    Interface MachineStateConfig<TValue, TContext, TEvent>

    单个状态节点配置。

    interface MachineStateConfig<
        TValue extends string,
        TContext,
        TEvent extends { type: string },
    > {
        entry?: (args: MachineHookArgs<TValue, TContext, TEvent>) => void;
        exit?: (args: MachineHookArgs<TValue, TContext, TEvent>) => void;
        on?: Partial<
            {
                [TType in string]: MachineTransitionConfig<
                    TValue,
                    TContext,
                    TEvent,
                    TType,
                >
            },
        >;
    }

    Type Parameters

    • TValue extends string

      状态值字面量联合类型

    • TContext

      上下文对象类型

    • TEvent extends { type: string }

      事件联合类型

    Index

    Properties

    Properties

    Optionalentry

    entry?: (args: MachineHookArgs<TValue, TContext, TEvent>) => void
    exit?: (args: MachineHookArgs<TValue, TContext, TEvent>) => void
    on?: Partial<
        {
            [TType in string]: MachineTransitionConfig<
                TValue,
                TContext,
                TEvent,
                TType,
            >
        },
    >