Interface ViewStateLockingRepository<E, S, V>

View State Locking repository interface

Author

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

Idugalic

interface ViewStateLockingRepository {
    fetchState: ((e) => Promise<readonly [null | S, null | V]>);
    save: ((s, currentStateVersion) => Promise<readonly [S, V]>);
}

Type Parameters

  • E

    Event

  • S

    State

  • V

    Version of the state

Hierarchy

Properties

Properties

fetchState: ((e) => Promise<readonly [null | S, null | V]>)

Type declaration

    • (e): Promise<readonly [null | S, null | V]>
    • Fetch state

      Parameters

      • e: E

        Event of type E

      Returns Promise<readonly [null | S, null | V]>

      current state of type [S , V]

save: ((s, currentStateVersion) => Promise<readonly [S, V]>)

Type declaration

    • (s, currentStateVersion): Promise<readonly [S, V]>
    • Save state

      Parameters

      • s: S

        State of type S

      • currentStateVersion: null | V

        State version of type V | null

      Returns Promise<readonly [S, V]>

      newly saved State of type [S, V]

Generated using TypeDoc