Skip to content

EventDispatcher.subscribe

github-actions[bot] edited this page Nov 17, 2024 · 2 revisions

Subscribes the given eventHandler to the event.

public subscribe<TEventHandler extends IEventHandler<TSubject, TEventArgs>>(
  eventHandler: TEventHandler
): void

Source reference: src/events/EventDispatcher.ts:20.

Generic Parameters

  • TEventHandler

    Type constraints: IEventHandler<TSubject, TEventArgs>.

Parameters

  • eventHandler: TEventHandler
    An event handler that gets notified when the event is raised.
Clone this wiki locally