the object type returned
Internal implementation detail, do not use directly.
Method to retrieve the observable to wait on for obtaining the value
A cold observable on the value.
Creates a new Observable with this Subject as the source. You can do this to create customize Observer-side logic of the Subject and conceal it from code that uses the Observable.
Observable that the Subject casts to
a handler for each value emitted by the observable
a promise that either resolves on observable completion or rejects with the handled error
Method to call once to set the value when its known. This method will complete the informer object
Value to set.
Generated using TypeDoc
A small class to use when it is needed to return an asyncronous information. (it's just a wrapper around AsyncSubject)
example:
Let say that the following method have to return an observable (because of the interface of the class). But the value returned by the observable isn't known yet. One can use the Informer to complete the observable asyncronously using the
informmethod (setTimeOut is used to emulate this asyncronous behaviors).{ const i = new Informer<number>() setTimeOut(1000,function(){ i.inform(1) }) return i.obs$ }