A typed set of listeners with safe fan-out dispatch.
Each call to emit iterates a snapshot of the current listeners,
wrapping each invocation in a try/catch so that one faulty listener
cannot prevent subsequent listeners from being called.
Type Parameters
Textends(arg:never)=>void
The listener function signature (must accept a single argument).
A typed set of listeners with safe fan-out dispatch.
Each call to emit iterates a snapshot of the current listeners, wrapping each invocation in a try/catch so that one faulty listener cannot prevent subsequent listeners from being called.