Starts sending state updates to the given receiver
.
Target receiver of state updates.
A supply of state updates from this sender to the given receiver
.
Starts sending events to the given receiver
.
Target receiver of events.
A supply of events from this sender to the given receiver
.
Returns an OnEvent instance of this event sender.
OnEvent instance registering event receivers sent by this sender.
Applies the given processor to events.
Action result type.
An event processor accepting this supplier as its only parameter, and returning application result.
Processing result.
Applies the given processors to events.
The value returned from each processor application is passed as argument to the next one. The value returned from the last processor application is the result of this method call.
The second processor application result type.
An event processor accepting this supplier as its only parameter, and returning application result.
An event processor accepting the first one's application result as its only parameter, and returning its own application result.
The last processor application result.
Attaches callbacks to the next event and/or supply cut off reason.
This method makes event sender act as promise-like for the first parameter of the next event. Thus it is possible
e.g. to use it in await
expression.
Optional
onEvent: null | ((...event) => TResult1 | PromiseLike<TResult1>)The callback to execute when next event received.
Optional
onCutOff: null | ((reason) => TResult2 | PromiseLike<TResult2>)The callback to execute when supply is cut off before the next event received.
A Promise for the next event.
Generated using TypeDoc
A sender of events.
Contains an OnEvent instance registering event receivers.