Class Saga<AR, A>

Saga is a datatype that represents the central point of control deciding what to execute next A. It is responsible for mapping different events from aggregates into action results AR that the Saga then can use to calculate the next actions A to be mapped to command of other aggregates.

Author

Иван Дугалић / Ivan Dugalic /

Idugalic

Type Parameters

  • AR

    Action Result type

  • A

    Action type

Implements

Constructors

  • Type Parameters

    • AR
    • A

    Parameters

    • react: ((actionResult) => readonly A[])

      A function/lambda that takes input state of type AR, and returns the list of actions A[]>.

        • (actionResult): readonly A[]
        • Parameters

          • actionResult: AR

          Returns readonly A[]

    Returns Saga<AR, A>

Properties

react: ((actionResult) => readonly A[])

A function/lambda that takes input state of type AR, and returns the list of actions A[]>.

Type declaration

    • (actionResult): readonly A[]
    • Parameters

      • actionResult: AR

      Returns readonly A[]

Methods

  • Left map on AR/ActionResult parameter - Contravariant

    Type Parameters

    • ARn

      New Action Result

    Parameters

    • f: ((arn) => AR)
        • (arn): AR
        • Parameters

          Returns AR

    Returns Saga<ARn, A>

Generated using TypeDoc