source: trip-planner-front/node_modules/rxjs/internal/util/toSubscriber.js@ e29cc2e

Last change on this file since e29cc2e was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 823 bytes
Line 
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3var Subscriber_1 = require("../Subscriber");
4var rxSubscriber_1 = require("../symbol/rxSubscriber");
5var Observer_1 = require("../Observer");
6function 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}
20exports.toSubscriber = toSubscriber;
21//# sourceMappingURL=toSubscriber.js.map
Note: See TracBrowser for help on using the repository browser.