Create an iterator with the default options of this subscribable.
iterable/iterator
Create a subscribable that will apply the specified filter to any listeners added.
filtered AsyncSubscribable
Create an iterator that supports async iteration of events emitted.
Optionaloptions: EventIteratorOptions
options for this iterator
iterable/iterator
Create a subscribable that changes the arguments of events before listeners receive them. The mapper returns the new arguments as an array, or a promise of the array:
const doubled = subscribable.map(n => [ n * 2 ]);
mapped AsyncSubscribable
Get a promise that will resolve the first time this event is fired after this call.
Optionaloptions: OnceOptions
options, such as a signal that stops the wait
promise that resolves the next time the event is fired
Subscribe to this event using the given listener. The listener will be invoked any time the event is emitted. The returned handle can be used to unsubscribe.
listener to subscribe
Optionaloptions: SubscribeOptions
options for the subscription, such as a signal that unsubscribes
promise with handle to the subscription, can be used to unsubscribe. Resolves when the subscription is fully registered
Create a Subscribable that changes the this argument used for listeners.
what should be treated as this for event listeners
modified AsyncSubscribable
Functions used to asynchronously subscribe and unsubscribe to an event.