Interface IView<S, E>

IView Interface

Represents the event handling algorithm, responsible for translating the events into denormalized state, which is more adequate for querying.

Param: evolve

A function/lambda that takes input state of type Si and input event of type Ei as parameters, and returns the output/new state So

Param: initialState

A starting point / An initial state of type So

Author

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

Idugalic

interface IView {
    evolve: ((s, e) => S);
    initialState: S;
}

Type Parameters

  • S

    State

  • E

    Event

Hierarchy

Implemented by

Properties

Properties

evolve: ((s, e) => S)

Type declaration

    • (s, e): S
    • Parameters

      • s: S
      • e: E

      Returns S

initialState: S

Generated using TypeDoc