Options
All
  • Public
  • Public/Protected
  • All
Menu

Map of event callback types including any event (event name → callback).

Type Parameters

  • Item extends PartItem<IdProp>

    Item type that may or may not have an id.

  • IdProp extends string

    Name of the property that contains the id.

Hierarchy

Index

Methods

  • *<N>(name: N, payload: EventPayloads<Item, IdProp>[N], senderId?: null | Id): void
  • Type Parameters

    Parameters

    • name: N

      The name of the event (EventName).

    • payload: EventPayloads<Item, IdProp>[N]

      Data about the items affected by this event.

    • Optional senderId: null | Id

      A senderId, optionally provided by the application code which triggered the event. If senderId is not provided, the argument will be null.

    Returns void

  • add(name: "add", payload: null | AddEventPayload, senderId?: null | Id): void
  • Parameters

    • name: "add"

      The name of the event (EventName).

    • payload: null | AddEventPayload

      Data about the items affected by this event.

    • Optional senderId: null | Id

      A senderId, optionally provided by the application code which triggered the event. If senderId is not provided, the argument will be null.

    Returns void

  • remove(name: "remove", payload: null | RemoveEventPayload<Item, IdProp>, senderId?: null | Id): void
  • Parameters

    • name: "remove"

      The name of the event (EventName).

    • payload: null | RemoveEventPayload<Item, IdProp>

      Data about the items affected by this event.

    • Optional senderId: null | Id

      A senderId, optionally provided by the application code which triggered the event. If senderId is not provided, the argument will be null.

    Returns void

  • update(name: "update", payload: null | UpdateEventPayload<Item, IdProp>, senderId?: null | Id): void
  • Parameters

    • name: "update"

      The name of the event (EventName).

    • payload: null | UpdateEventPayload<Item, IdProp>

      Data about the items affected by this event.

    • Optional senderId: null | Id

      A senderId, optionally provided by the application code which triggered the event. If senderId is not provided, the argument will be null.

    Returns void

Generated using TypeDoc