2018-11-22 16:41:46 +01:00
|
|
|
"use strict";
|
|
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
|
var Observable_1 = require("../Observable");
|
|
|
|
var subscribeToPromise_1 = require("../util/subscribeToPromise");
|
2019-06-04 14:29:48 +02:00
|
|
|
var schedulePromise_1 = require("../scheduled/schedulePromise");
|
2018-11-22 16:41:46 +01:00
|
|
|
function fromPromise(input, scheduler) {
|
|
|
|
if (!scheduler) {
|
|
|
|
return new Observable_1.Observable(subscribeToPromise_1.subscribeToPromise(input));
|
|
|
|
}
|
|
|
|
else {
|
2019-06-04 14:29:48 +02:00
|
|
|
return schedulePromise_1.schedulePromise(input, scheduler);
|
2018-11-22 16:41:46 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
exports.fromPromise = fromPromise;
|
2019-06-04 14:29:48 +02:00
|
|
|
//# sourceMappingURL=fromPromise.js.map
|