Ohm-Management - Projektarbeit B-ME
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

schedulePromise.js 644B

1234567891011121314151617
  1. import { Observable } from '../Observable';
  2. import { Subscription } from '../Subscription';
  3. export 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