IEvent - Andrei15193/react-model-view-viewmodel GitHub Wiki

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

⚠️ **GitHub.com Fallback** ⚠️