Use Observable <void> or Observable <any> to emit a null value?
There are cases where the return value of the async operation is not relevant or not given at all. In these cases, the signatures of asynchronous operation methods are often defined Observable<any>either Promise<any>as the return value.
Example
For example, Ionic2 NavController defines:
/** // ...
* @returns {Promise} Returns a promise which is resolved when the transition has completed.
*/
abstract remove(/* ... */): Promise<any>;
Despite the actual implementation, I can’t say whether the value is really not selected (for example, nullor undefined), or I could extract some useful information from the emitted values.
Question Observable<void>:?
I have not seen Observable<void>or Promise<void>in the wild. Using this, it would be clear that there is no emitted useful value. Are there technical reasons not to use a type voidwith observables? Or why no one uses this to denote empty values?