Actualizacion maquina principal
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / rxjs / _esm2015 / internal / operators / onErrorResumeNext.js
diff --git a/.config/coc/extensions/node_modules/coc-prettier/node_modules/rxjs/_esm2015/internal/operators/onErrorResumeNext.js b/.config/coc/extensions/node_modules/coc-prettier/node_modules/rxjs/_esm2015/internal/operators/onErrorResumeNext.js
new file mode 100644 (file)
index 0000000..67a64f7
--- /dev/null
@@ -0,0 +1,64 @@
+import { from } from '../observable/from';
+import { isArray } from '../util/isArray';
+import { OuterSubscriber } from '../OuterSubscriber';
+import { InnerSubscriber } from '../InnerSubscriber';
+import { subscribeToResult } from '../util/subscribeToResult';
+export function onErrorResumeNext(...nextSources) {
+    if (nextSources.length === 1 && isArray(nextSources[0])) {
+        nextSources = nextSources[0];
+    }
+    return (source) => source.lift(new OnErrorResumeNextOperator(nextSources));
+}
+export function onErrorResumeNextStatic(...nextSources) {
+    let source = null;
+    if (nextSources.length === 1 && isArray(nextSources[0])) {
+        nextSources = nextSources[0];
+    }
+    source = nextSources.shift();
+    return from(source, null).lift(new OnErrorResumeNextOperator(nextSources));
+}
+class OnErrorResumeNextOperator {
+    constructor(nextSources) {
+        this.nextSources = nextSources;
+    }
+    call(subscriber, source) {
+        return source.subscribe(new OnErrorResumeNextSubscriber(subscriber, this.nextSources));
+    }
+}
+class OnErrorResumeNextSubscriber extends OuterSubscriber {
+    constructor(destination, nextSources) {
+        super(destination);
+        this.destination = destination;
+        this.nextSources = nextSources;
+    }
+    notifyError(error, innerSub) {
+        this.subscribeToNextSource();
+    }
+    notifyComplete(innerSub) {
+        this.subscribeToNextSource();
+    }
+    _error(err) {
+        this.subscribeToNextSource();
+        this.unsubscribe();
+    }
+    _complete() {
+        this.subscribeToNextSource();
+        this.unsubscribe();
+    }
+    subscribeToNextSource() {
+        const next = this.nextSources.shift();
+        if (!!next) {
+            const innerSubscriber = new InnerSubscriber(this, undefined, undefined);
+            const destination = this.destination;
+            destination.add(innerSubscriber);
+            const innerSubscription = subscribeToResult(this, next, undefined, undefined, innerSubscriber);
+            if (innerSubscription !== innerSubscriber) {
+                destination.add(innerSubscription);
+            }
+        }
+        else {
+            this.destination.complete();
+        }
+    }
+}
+//# sourceMappingURL=onErrorResumeNext.js.map
\ No newline at end of file