Repositorio del curso CCOM4030 el semestre B91 del proyecto Artesanías con el Instituto de Cultura

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