• Returns all states including root and all descendants.

    Note: this includes the "state" representing the machine itself if passed a machine.

    To retrieve only "proper" states (excluding the root/machine itself), use getAllProperStates.

    Returns

    A list of all states.

    Type Parameters

    • TContext

    • TStateSchema extends StateSchema<any, TStateSchema>

    • TEvent extends EventObject

    • TStateMachine extends StateMachine<TContext, TStateSchema, TEvent, any, any, any, ResolveTypegenMeta<TypegenDisabled, NoInfer<TEvent>, any, any>, TStateMachine>

    • TStateNode extends StateNode<TContext, TStateSchema, TEvent, any, any, any, TStateNode>

    Parameters

    • root: TStateMachine | TStateNode

      The StateMachine or StateNode for which to get all states.

    Returns StateNodeDefinition<TContext, TStateSchema, TEvent>[]

Generated using TypeDoc