Interface IEventStore<T>

A light state management pattern allowing storage, retrieval, and monitoring of state.

interface IEventStore<T> {
    GetLedger(): Transaction<T>[];
    GetState(): T;
    GetState<V>(member): V;
    ObservableAt(): Observable<T>;
    ObservableAt<V>(member): Observable<V>;
    Redo(): Result<undefined | T>;
    SetState<T>(state): Result<T>;
    SetState<V>(member, state): Result<V>;
    Undo(): Result<undefined | T>;
}

Type Parameters

  • T extends object

Implemented by

Methods

  • Reverses the void on the newest voided transaction excluding any voided transaction that follows a non-voided one (Once state is set, prior voided transactions cannot be reversed)

    Returns Result<undefined | T>

Generated using TypeDoc