source: trip-planner-front/node_modules/rxjs/_esm2015/internal/scheduled/schedulePromise.js

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: 644 bytes
Line 
1import { Observable } from '../Observable';
2import { Subscription } from '../Subscription';
3export function schedulePromise(input, scheduler) {
4 return new Observable(subscriber => {
5 const sub = new Subscription();
6 sub.add(scheduler.schedule(() => input.then(value => {
7 sub.add(scheduler.schedule(() => {
8 subscriber.next(value);
9 sub.add(scheduler.schedule(() => subscriber.complete()));
10 }));
11 }, err => {
12 sub.add(scheduler.schedule(() => subscriber.error(err)));
13 })));
14 return sub;
15 });
16}
17//# sourceMappingURL=schedulePromise.js.map
Note: See TracBrowser for help on using the repository browser.