Optional
eventName: TEventNameOptional eventName to clear.
Emit an event to eventName
listeners.
Emit an event with payload to eventName
listeners.
If the eventName has any listener.
Optional
eventName: TEventNameOptional eventName to check.
true
if the eventName has any listener, false
otherwise. If no eventName is provided, returns true
if the Remitter has any listener.
Remove a listener from the eventName.
Remove a listener from ANY_EVENT
.
Remove a listener from ERROR_EVENT
.
Add a listener to the eventName.
Add an ANY_EVENT
listener to receive all events.
Add a one-time listener to the eventName.
Add a one-time listener to ANY_EVENT
to receive all events.
Add a one-time listener to ERROR_EVENT
to receive unhandled subscriber errors.
Add an ERROR_EVENT
listener to receive unhandled subscriber errors.
Start a side effect when the eventName has a first listener. Dispose the side effect when the eventName has no listeners. Useful for tapping into other events.
A function that is called when listener count of eventName
grows from 0 to 1.
Returns a disposer when listener count of eventName
drops from 1 to 0.
Start a side effect when the first listener. Dispose the side effect when the eventName has no listeners. Useful for tapping into other events.
A function that is called when all listener count grows from 0 to 1. Returns a disposer when all listener count drops from 1 to 0.
Remove all listeners from the eventName or all events.