fromPromise.js 575 B

123456789101112131415
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. var Observable_1 = require("../Observable");
  4. var subscribeToPromise_1 = require("../util/subscribeToPromise");
  5. var schedulePromise_1 = require("../scheduled/schedulePromise");
  6. function fromPromise(input, scheduler) {
  7. if (!scheduler) {
  8. return new Observable_1.Observable(subscribeToPromise_1.subscribeToPromise(input));
  9. }
  10. else {
  11. return schedulePromise_1.schedulePromise(input, scheduler);
  12. }
  13. }
  14. exports.fromPromise = fromPromise;
  15. //# sourceMappingURL=fromPromise.js.map