Interface EventRepository<C, E>

Event repository interface

Author

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

Idugalic

interface EventRepository {
    fetchEvents: ((c) => Promise<readonly E[]>);
    save: ((e) => Promise<E>);
    saveAll: ((eList) => Promise<readonly E[]>);
}

Type Parameters

  • C

    Command

  • E

    Event

Hierarchy

Properties

fetchEvents: ((c) => Promise<readonly E[]>)

Type declaration

    • (c): Promise<readonly E[]>
    • Fetch events

      Parameters

      • c: C

        Command of type C

      Returns Promise<readonly E[]>

      list of Events of type E

save: ((e) => Promise<E>)

Type declaration

    • (e): Promise<E>
    • Save event

      Parameters

      • e: E

        Event of type E

      Returns Promise<E>

      newly saved Event of type E

saveAll: ((eList) => Promise<readonly E[]>)

Type declaration

    • (eList): Promise<readonly E[]>
    • Save events

      Parameters

      • eList: readonly E[]

        list of Events of type E

      Returns Promise<readonly E[]>

      newly saved list of Events of type E

Generated using TypeDoc