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

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

initial commit

  • Property mode set to 100644
File size: 776 bytes
Line 
1/** PURE_IMPORTS_START _Subscriber,_symbol_rxSubscriber,_Observer PURE_IMPORTS_END */
2import { Subscriber } from '../Subscriber';
3import { rxSubscriber as rxSubscriberSymbol } from '../symbol/rxSubscriber';
4import { empty as emptyObserver } from '../Observer';
5export function toSubscriber(nextOrObserver, error, complete) {
6 if (nextOrObserver) {
7 if (nextOrObserver instanceof Subscriber) {
8 return nextOrObserver;
9 }
10 if (nextOrObserver[rxSubscriberSymbol]) {
11 return nextOrObserver[rxSubscriberSymbol]();
12 }
13 }
14 if (!nextOrObserver && !error && !complete) {
15 return new Subscriber(emptyObserver);
16 }
17 return new Subscriber(nextOrObserver, error, complete);
18}
19//# sourceMappingURL=toSubscriber.js.map
Note: See TracBrowser for help on using the repository browser.