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
.
-
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
.
- 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.