Ohm-Management - Projektarbeit B-ME
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

scheduleObservable.js 824B

123456789101112131415161718
  1. import { Observable } from '../Observable';
  2. import { Subscription } from '../Subscription';
  3. import { observable as Symbol_observable } from '../symbol/observable';
  4. export function scheduleObservable(input, scheduler) {
  5. return new Observable(subscriber => {
  6. const sub = new Subscription();
  7. sub.add(scheduler.schedule(() => {
  8. const observable = input[Symbol_observable]();
  9. sub.add(observable.subscribe({
  10. next(value) { sub.add(scheduler.schedule(() => subscriber.next(value))); },
  11. error(err) { sub.add(scheduler.schedule(() => subscriber.error(err))); },
  12. complete() { sub.add(scheduler.schedule(() => subscriber.complete())); },
  13. }));
  14. }));
  15. return sub;
  16. });
  17. }
  18. //# sourceMappingURL=scheduleObservable.js.map