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:
844 bytes
|
Line | |
---|
1 | /** PURE_IMPORTS_START _Observable,_Subscription PURE_IMPORTS_END */
|
---|
2 | import { Observable } from '../Observable';
|
---|
3 | import { Subscription } from '../Subscription';
|
---|
4 | export function schedulePromise(input, scheduler) {
|
---|
5 | return new Observable(function (subscriber) {
|
---|
6 | var sub = new Subscription();
|
---|
7 | sub.add(scheduler.schedule(function () {
|
---|
8 | 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 | }));
|
---|
17 | return sub;
|
---|
18 | });
|
---|
19 | }
|
---|
20 | //# sourceMappingURL=schedulePromise.js.map
|
---|
Note:
See
TracBrowser
for help on using the repository browser.