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