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.

toSubscriber.js 823B

123456789101112131415161718192021
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. var Subscriber_1 = require("../Subscriber");
  4. var rxSubscriber_1 = require("../symbol/rxSubscriber");
  5. var Observer_1 = require("../Observer");
  6. function toSubscriber(nextOrObserver, error, complete) {
  7. if (nextOrObserver) {
  8. if (nextOrObserver instanceof Subscriber_1.Subscriber) {
  9. return nextOrObserver;
  10. }
  11. if (nextOrObserver[rxSubscriber_1.rxSubscriber]) {
  12. return nextOrObserver[rxSubscriber_1.rxSubscriber]();
  13. }
  14. }
  15. if (!nextOrObserver && !error && !complete) {
  16. return new Subscriber_1.Subscriber(Observer_1.empty);
  17. }
  18. return new Subscriber_1.Subscriber(nextOrObserver, error, complete);
  19. }
  20. exports.toSubscriber = toSubscriber;
  21. //# sourceMappingURL=toSubscriber.js.map