Triggers an event, calling all registered listeners with the provided value.
Errors in listeners are caught and logged without interrupting other listeners.
Listeners are snapshotted first (like Node's EventEmitter): a listener added
during the emit runs from the next emit, so a once handler that re-registers
itself cannot re-fire within the same emit.
Creates a promise that resolves when the specified event is emitted.
Event name to wait for
Timeout in milliseconds, or { timeout, signal }; aborting the signal
removes the listener and timer and rejects with signal.reason
Promise that resolves with the event payload when emitted
Creates a promise that resolves when an event matching the predicate is emitted.
Event name to wait for
Function that evaluates if the event payload should resolve the promise
Timeout in milliseconds, or { timeout, signal }; aborting the signal
removes the listener and timer and rejects with signal.reason
Promise that resolves with the event payload when predicate matches
Removes one or more event listeners.
Number of listeners removed
Registers a listener that will be called exactly once when the event is emitted.
Unregister function to remove the listener before it's triggered
Registers a listener that will be called once when an event matching the predicate is emitted.
Unregister function to remove the listener before it's triggered
Typed event emitter similar to EventEmitter from Node.js standard library. Provides type-safe event handling with generics.