Skip to content
github-actions[bot] edited this page Nov 17, 2024 · 2 revisions
API / IEvent<TSubject, TEventArgs> interface

Represents an event to which objects can subscribe and unsubscribe from. Similar to an event in .NET.

interface IEvent<TSubject, TEventArgs = void>

Source reference: src/events/IEvent.ts:8.

Generic Parameters

  • TSubject - Optional, the type of object that raises the event.

  • TEventArgs - Optional, the type of the event context containing additional information about the event.

    Default value: void.

Methods

  • subscribe - Subscribes the given eventHandler to the event.
  • unsubscribe - Unsubscribes the given eventHandler to the event. The exact same object that was used to subscribe to the event must be passed as well.

Implementations

Clone this wiki locally