The internal Datatype of the Emitter
Datatype, the setContent
method must receive
Datatype, that will be during forwarding the event data.
The Additional Event-Data, that observers will receive.
Flag to Disable Publishing of the emitter. This results in not inform the relevant subscriber / observers.
Helper to transform the data using a getter.
Readonly
hasFlag, showing if there exists any subscription this particular observer.
Readonly
idAn id of the Observable. This might be usefull for debugging.
Readonly
observerReturns the amout of interessed Subscribers / Observers.
options.
Property, a custom setter.
This setter is used to determine, whether the event should be published or not
Therefore it is implemented as callback, which has to return the adpated data
,
and a flag, which shows whether the data
is valid
or not. If the data is
marked es invalid, the event wont be published.
If not required the setter must be set to null
Optional
options: Partial<AD>Creates a Subscription for the value of the Event Emitter. After one Update the Subscription will be deleted
Function which is called when new Datas are pushed. The Function must follow the definition in IEventCallback
Optional
options: INopeSubscriptionOptionsAdditional Options used during subscribing INopeSubscriptionOptions
A Function to subscribe to updates of the Event Emitter.
Function which is called when new Datas are pushed. The Function must follow the definition in IEventCallback
Optional
options: INopeSubscriptionOptionsAdditional Options used during subscribing INopeSubscriptionOptions
Async Function to Wait for an Update until the given testCallback
returns true
.
The testCallback
defaultly test for true
Contains the Data, which firstly fullfilled the testCallback
Optional
testCallback: IWaitForCallback<G, AD>Test-Callback which can be implemented async
or sync
. It must return true
to fullfill the promise.
Optional
options: INopeWaitForEventOptionsOptions, to controll the method. (see INopeWaitForEventOptions)
Async Function to Wait for an Update. No specific condition must match. The code will be just awaited until an updat is received.
Optional
options: INopeSubscriptionOptionsAdditional Options for the Wait Function.
Generated using TypeDoc
An EventEmitter is used to share Events in the System. Therefore the Eventemitter provides the method:
emit
, which will emit an event.Observers subscribe to that event an will receive an notification using a callback and subscribing to an event (see subscribe). If they are temporarily are not interessed the observer can use the
pause
(andunpause
) Methods to temporarily controll the subscription. If the subscription isnt used any more, the methodunsubscribe
will be used to unsubscribe from the emitter.To adapt and controll the events before publishing, a custom
setter
can be assigned (see setter). This setter is used to determine, whether the event should be published or not.During subscribing to the emitter, you receive an INopeObserver
Export
INopeEventEmitter