The type of the event payload.
The type of the event.
Unsubscribe a function previously subscribed with on
An event name to which the provided function was previously subscribed.
A function that was previously passed to on. The function must have the same reference as the function that was subscribed.
Subscribe a function to an event.
An event name which, when fired, will call the provided function.
A callback that gets called when the corresponding event is fired. The callback will get passed an argument with a type that's one of event payloads.
Generic PubSub class implementing the Publish-Subscribe pattern for event handling.