12345678910111213141516171819 |
- /** PURE_IMPORTS_START _Observable,_Subscription,_symbol_observable PURE_IMPORTS_END */
- import { Observable } from '../Observable';
- import { Subscription } from '../Subscription';
- import { observable as Symbol_observable } from '../symbol/observable';
- export function scheduleObservable(input, scheduler) {
- return new Observable(function (subscriber) {
- var sub = new Subscription();
- sub.add(scheduler.schedule(function () {
- var observable = input[Symbol_observable]();
- sub.add(observable.subscribe({
- next: function (value) { sub.add(scheduler.schedule(function () { return subscriber.next(value); })); },
- error: function (err) { sub.add(scheduler.schedule(function () { return subscriber.error(err); })); },
- complete: function () { sub.add(scheduler.schedule(function () { return subscriber.complete(); })); },
- }));
- }));
- return sub;
- });
- }
- //# sourceMappingURL=scheduleObservable.js.map
|