Last change
on this file since 6c1585f was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
1.0 KB
|
Rev | Line | |
---|
[6a3a178] | 1 | "use strict";
|
---|
| 2 | Object.defineProperty(exports, "__esModule", { value: true });
|
---|
| 3 | var Observable_1 = require("../Observable");
|
---|
| 4 | var Subscription_1 = require("../Subscription");
|
---|
| 5 | var observable_1 = require("../symbol/observable");
|
---|
| 6 | function scheduleObservable(input, scheduler) {
|
---|
| 7 | return new Observable_1.Observable(function (subscriber) {
|
---|
| 8 | var sub = new Subscription_1.Subscription();
|
---|
| 9 | sub.add(scheduler.schedule(function () {
|
---|
| 10 | var observable = input[observable_1.observable]();
|
---|
| 11 | sub.add(observable.subscribe({
|
---|
| 12 | next: function (value) { sub.add(scheduler.schedule(function () { return subscriber.next(value); })); },
|
---|
| 13 | error: function (err) { sub.add(scheduler.schedule(function () { return subscriber.error(err); })); },
|
---|
| 14 | complete: function () { sub.add(scheduler.schedule(function () { return subscriber.complete(); })); },
|
---|
| 15 | }));
|
---|
| 16 | }));
|
---|
| 17 | return sub;
|
---|
| 18 | });
|
---|
| 19 | }
|
---|
| 20 | exports.scheduleObservable = scheduleObservable;
|
---|
| 21 | //# sourceMappingURL=scheduleObservable.js.map |
---|
Note:
See
TracBrowser
for help on using the repository browser.