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