The type of data emitted with the event.
ProtecteddispatchRegisters a listener function to be called when the event is dispatched.
If the listener is already registered, this method has no effect.
Optionaloptions: EventDispatcherSubscribeOptionsOptional settings for the subscription.
A function that can be called to unsubscribe the listener, or null if the listener was already registered.
Waits for the next occurrence of the event, optionally matching a predicate.
This is a convenience method that subscribes to the dispatcher, waits for the next event that matches the predicate (if provided), and then unsubscribes automatically.
Optionaloptions: EventDispatcherWaitOptions<[T]>Optional settings including predicate and abort signal.
A promise that resolves with the next event arguments as an array.
An event that can be emitted with data of type
Tand waited upon.Example