ecspresso
    Preparing search index...

    Interface StateMachineHelpers<W>

    Typed helpers for the state machine plugin. Creates helpers that validate hook parameters against the world type W. Call after .build() using typeof ecs.

    interface StateMachineHelpers<W extends BaseWorld<StateMachineComponentTypes>> {
        defineStateMachine: <S extends string>(
            id: string,
            config: {
                initial: NoInfer<S>;
                states: Record<S, StateConfig<NoInfer<S>, W>>;
            },
        ) => StateMachineDefinition<S>;
    }

    Type Parameters

    Index

    Properties

    defineStateMachine: <S extends string>(
        id: string,
        config: {
            initial: NoInfer<S>;
            states: Record<S, StateConfig<NoInfer<S>, W>>;
        },
    ) => StateMachineDefinition<S>