Interface StateRepository<C, S>

State repository interface

Author

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

Idugalic

interface StateRepository {
    fetchState: ((c) => Promise<null | S>);
    save: ((s) => Promise<S>);
}

Type Parameters

  • C

    Command

  • S

    State

Hierarchy

Properties

Properties

fetchState: ((c) => Promise<null | S>)

Type declaration

    • (c): Promise<null | S>
    • Fetch state

      Parameters

      • c: C

        Command of type C

      Returns Promise<null | S>

      current state of type S

save: ((s) => Promise<S>)

Type declaration

    • (s): Promise<S>
    • Save state

      Parameters

      • s: S

        State of type S

      Returns Promise<S>

      newly saved State of type S

Generated using TypeDoc