Giant blob of minor changes
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / rxjs / _esm2015 / internal / operators / bufferWhen.js
index a2dca4f02604473a7e98916a86e1a8f6079ad645..705f3e4071f6d836ac3d186d753a43d48502e501 100644 (file)
@@ -1,6 +1,5 @@
 import { Subscription } from '../Subscription';
-import { OuterSubscriber } from '../OuterSubscriber';
-import { subscribeToResult } from '../util/subscribeToResult';
+import { SimpleOuterSubscriber, innerSubscribe, SimpleInnerSubscriber } from '../innerSubscribe';
 export function bufferWhen(closingSelector) {
     return function (source) {
         return source.lift(new BufferWhenOperator(closingSelector));
@@ -14,7 +13,7 @@ class BufferWhenOperator {
         return source.subscribe(new BufferWhenSubscriber(subscriber, this.closingSelector));
     }
 }
-class BufferWhenSubscriber extends OuterSubscriber {
+class BufferWhenSubscriber extends SimpleOuterSubscriber {
     constructor(destination, closingSelector) {
         super(destination);
         this.closingSelector = closingSelector;
@@ -32,10 +31,10 @@ class BufferWhenSubscriber extends OuterSubscriber {
         super._complete();
     }
     _unsubscribe() {
-        this.buffer = null;
+        this.buffer = undefined;
         this.subscribing = false;
     }
-    notifyNext(outerValue, innerValue, outerIndex, innerIndex, innerSub) {
+    notifyNext() {
         this.openBuffer();
     }
     notifyComplete() {
@@ -69,7 +68,7 @@ class BufferWhenSubscriber extends OuterSubscriber {
         this.closingSubscription = closingSubscription;
         this.add(closingSubscription);
         this.subscribing = true;
-        closingSubscription.add(subscribeToResult(this, closingNotifier));
+        closingSubscription.add(innerSubscribe(closingNotifier, new SimpleInnerSubscriber(this)));
         this.subscribing = false;
     }
 }