Event notifier can be used to register event receivers and send events to them.

It does not implement an EventSender interface though. Use an EventEmitter if you need one.

Manages a list of registered event receivers, and removes them from the list once their supplies are Supply.off cut off.

Type Parameters

  • TEvent extends any[]

    An event type. This is a list of event receiver parameter types.

Hierarchy

Implements

  • SupplyPeer

Constructors

Properties

Accessors

Methods

Constructors

Properties

_rcs?: Set<Generic<TEvent>>
send: ((this, ...event) => void)

Type declaration

    • (this, ...event): void
    • Sends the given event to all registered receivers.

      Parameters

      • this: EventNotifier<TEvent>
      • Rest ...event: TEvent

        An event to send represented by function call arguments.

      Returns void

supply: Supply

Accessors

Methods

Generated using TypeDoc