Giant blob of minor changes
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / rxjs / _esm2015 / internal / operators / expand.js
index b999780dcf75a2e37a5ea60969fc4ec99cc4a86f..11f8cf727eb9da665d68fe1b4eabf2969e583ca8 100644 (file)
@@ -1,6 +1,5 @@
-import { OuterSubscriber } from '../OuterSubscriber';
-import { subscribeToResult } from '../util/subscribeToResult';
-export function expand(project, concurrent = Number.POSITIVE_INFINITY, scheduler = undefined) {
+import { SimpleOuterSubscriber, innerSubscribe, SimpleInnerSubscriber } from '../innerSubscribe';
+export function expand(project, concurrent = Number.POSITIVE_INFINITY, scheduler) {
     concurrent = (concurrent || 0) < 1 ? Number.POSITIVE_INFINITY : concurrent;
     return (source) => source.lift(new ExpandOperator(project, concurrent, scheduler));
 }
@@ -14,7 +13,7 @@ export class ExpandOperator {
         return source.subscribe(new ExpandSubscriber(subscriber, this.project, this.concurrent, this.scheduler));
     }
 }
-export class ExpandSubscriber extends OuterSubscriber {
+export class ExpandSubscriber extends SimpleOuterSubscriber {
     constructor(destination, project, concurrent, scheduler) {
         super(destination);
         this.project = project;
@@ -63,7 +62,7 @@ export class ExpandSubscriber extends OuterSubscriber {
     subscribeToProjection(result, value, index) {
         this.active++;
         const destination = this.destination;
-        destination.add(subscribeToResult(this, result, value, index));
+        destination.add(innerSubscribe(result, new SimpleInnerSubscriber(this)));
     }
     _complete() {
         this.hasCompleted = true;
@@ -72,13 +71,11 @@ export class ExpandSubscriber extends OuterSubscriber {
         }
         this.unsubscribe();
     }
-    notifyNext(outerValue, innerValue, outerIndex, innerIndex, innerSub) {
+    notifyNext(innerValue) {
         this._next(innerValue);
     }
-    notifyComplete(innerSub) {
+    notifyComplete() {
         const buffer = this.buffer;
-        const destination = this.destination;
-        destination.remove(innerSub);
         this.active--;
         if (buffer && buffer.length > 0) {
             this._next(buffer.shift());