Last change
on this file was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
1010 bytes
|
Line | |
---|
1 | /** PURE_IMPORTS_START _Observable,_Subscription,_symbol_observable PURE_IMPORTS_END */
|
---|
2 | import { Observable } from '../Observable';
|
---|
3 | import { Subscription } from '../Subscription';
|
---|
4 | import { observable as Symbol_observable } from '../symbol/observable';
|
---|
5 | export function scheduleObservable(input, scheduler) {
|
---|
6 | return new Observable(function (subscriber) {
|
---|
7 | var sub = new Subscription();
|
---|
8 | sub.add(scheduler.schedule(function () {
|
---|
9 | var observable = input[Symbol_observable]();
|
---|
10 | sub.add(observable.subscribe({
|
---|
11 | next: function (value) { sub.add(scheduler.schedule(function () { return subscriber.next(value); })); },
|
---|
12 | error: function (err) { sub.add(scheduler.schedule(function () { return subscriber.error(err); })); },
|
---|
13 | complete: function () { sub.add(scheduler.schedule(function () { return subscriber.complete(); })); },
|
---|
14 | }));
|
---|
15 | }));
|
---|
16 | return sub;
|
---|
17 | });
|
---|
18 | }
|
---|
19 | //# sourceMappingURL=scheduleObservable.js.map
|
---|
Note:
See
TracBrowser
for help on using the repository browser.