Ohm-Management - Projektarbeit B-ME
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

subscribeToObservable.js 517B

12345678910111213
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. var observable_1 = require("../symbol/observable");
  4. exports.subscribeToObservable = function (obj) { return function (subscriber) {
  5. var obs = obj[observable_1.observable]();
  6. if (typeof obs.subscribe !== 'function') {
  7. throw new TypeError('Provided object does not correctly implement Symbol.observable');
  8. }
  9. else {
  10. return obs.subscribe(subscriber);
  11. }
  12. }; };
  13. //# sourceMappingURL=subscribeToObservable.js.map