IEvent

An interface for Events that can send asynchronious notifications to multiple subscribed listeners.

Extends: INotifiable

Description

The IEvent interface allows you to define events that can send asynchronous notifications to multiple subscribed listeners.

Instance methods

getName

Gets the event name.

getName(): string

  • returns: string - name of the event.

getListeners

Gets all subscribed listeners.

getListeners(): IEventListener[]

addListener

Adds a listener to receive notifications for this event.

addListener(listener: IEventListener): void

removeListener

Removes a listener, so that it no longer receives notifications for this event.

removeListener(listener: IEventListener): void

See also