Actualizacion maquina principal
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / rxjs / _esm5 / internal / util / toSubscriber.js
1 /** PURE_IMPORTS_START _Subscriber,_symbol_rxSubscriber,_Observer PURE_IMPORTS_END */
2 import { Subscriber } from '../Subscriber';
3 import { rxSubscriber as rxSubscriberSymbol } from '../symbol/rxSubscriber';
4 import { empty as emptyObserver } from '../Observer';
5 export 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