a zip code crypto-currency system good for red ONLY

share.d.ts 1.1KB

12345678910111213141516171819
  1. import { Observable } from '../Observable';
  2. /**
  3. * Returns a new Observable that multicasts (shares) the original Observable. As long as there is at least one
  4. * Subscriber this Observable will be subscribed and emitting data. When all subscribers have unsubscribed it will
  5. * unsubscribe from the source Observable. Because the Observable is multicasting it makes the stream `hot`.
  6. *
  7. * This behaves similarly to .publish().refCount(), with a behavior difference when the source observable emits complete.
  8. * .publish().refCount() will not resubscribe to the original source, however .share() will resubscribe to the original source.
  9. * Observable.of("test").publish().refCount() will not re-emit "test" on new subscriptions, Observable.of("test").share() will
  10. * re-emit "test" to new subscriptions.
  11. *
  12. * <img src="./img/share.png" width="100%">
  13. *
  14. * @return {Observable<T>} An Observable that upon connection causes the source Observable to emit items to its Observers.
  15. * @method share
  16. * @owner Observable
  17. */
  18. export declare function share<T>(this: Observable<T>): Observable<T>;