fromPromise.js 523 B

12345678910111213
  1. /** PURE_IMPORTS_START _Observable,_util_subscribeToPromise,_scheduled_schedulePromise PURE_IMPORTS_END */
  2. import { Observable } from '../Observable';
  3. import { subscribeToPromise } from '../util/subscribeToPromise';
  4. import { schedulePromise } from '../scheduled/schedulePromise';
  5. export function fromPromise(input, scheduler) {
  6. if (!scheduler) {
  7. return new Observable(subscribeToPromise(input));
  8. }
  9. else {
  10. return schedulePromise(input, scheduler);
  11. }
  12. }
  13. //# sourceMappingURL=fromPromise.js.map