Actualizacion maquina principal
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / rxjs / _esm2015 / internal / util / toSubscriber.js
diff --git a/.config/coc/extensions/node_modules/coc-prettier/node_modules/rxjs/_esm2015/internal/util/toSubscriber.js b/.config/coc/extensions/node_modules/coc-prettier/node_modules/rxjs/_esm2015/internal/util/toSubscriber.js
new file mode 100644 (file)
index 0000000..1d61183
--- /dev/null
@@ -0,0 +1,18 @@
+import { Subscriber } from '../Subscriber';
+import { rxSubscriber as rxSubscriberSymbol } from '../symbol/rxSubscriber';
+import { empty as emptyObserver } from '../Observer';
+export function toSubscriber(nextOrObserver, error, complete) {
+    if (nextOrObserver) {
+        if (nextOrObserver instanceof Subscriber) {
+            return nextOrObserver;
+        }
+        if (nextOrObserver[rxSubscriberSymbol]) {
+            return nextOrObserver[rxSubscriberSymbol]();
+        }
+    }
+    if (!nextOrObserver && !error && !complete) {
+        return new Subscriber(emptyObserver);
+    }
+    return new Subscriber(nextOrObserver, error, complete);
+}
+//# sourceMappingURL=toSubscriber.js.map
\ No newline at end of file