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<S, E> {
    evolve: ((state, event) => S);
    initialState: S;
}

Type Parameters

  • S

    State

  • E

    Event

Hierarchy (view full)

Implemented by

Properties

Properties

evolve: ((state, event) => S)

Type declaration

    • (state, event): S
    • Parameters

      • state: S
      • event: E

      Returns S

initialState: S

Generated using TypeDoc