from.js 587 B

123456789101112131415161718
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. var Observable_1 = require("../Observable");
  4. var subscribeTo_1 = require("../util/subscribeTo");
  5. var scheduled_1 = require("../scheduled/scheduled");
  6. function from(input, scheduler) {
  7. if (!scheduler) {
  8. if (input instanceof Observable_1.Observable) {
  9. return input;
  10. }
  11. return new Observable_1.Observable(subscribeTo_1.subscribeTo(input));
  12. }
  13. else {
  14. return scheduled_1.scheduled(input, scheduler);
  15. }
  16. }
  17. exports.from = from;
  18. //# sourceMappingURL=from.js.map