Type Alias SetContextAction<D>

SetContextAction<D>: ((prevContext: Context<D>) => Context<D>)

The type of the function to update the context of the state machine.

Type Parameters

  • D

    The type of the state machine definition.

Type declaration

    • (prevContext): Context<D>
    • The action to update the context of the state machine.

      Parameters

      • prevContext: Context<D>

        The type of the previous context of the state machine.

      Returns Context<D>

      The type of the new context of the state machine.