X-Git-Url: https://git.josue.xyz/?p=dotfiles%2F.git;a=blobdiff_plain;f=.config%2Fcoc%2Fextensions%2Fnode_modules%2Fcoc-prettier%2Fnode_modules%2Frxjs%2F_esm2015%2Finternal%2Foperators%2Fthrottle.js;h=6b32790d8e59bb713611fb037c28d19f77725c00;hp=fc073178ac53de32c5fd977257a5908862acd188;hb=4d07c77cf4d78cab8639e13ddc3c22495e585b0b;hpb=b3950616b54221c40a7dab9099bda675007e5b6e diff --git a/.config/coc/extensions/node_modules/coc-prettier/node_modules/rxjs/_esm2015/internal/operators/throttle.js b/.config/coc/extensions/node_modules/coc-prettier/node_modules/rxjs/_esm2015/internal/operators/throttle.js index fc073178..6b32790d 100644 --- a/.config/coc/extensions/node_modules/coc-prettier/node_modules/rxjs/_esm2015/internal/operators/throttle.js +++ b/.config/coc/extensions/node_modules/coc-prettier/node_modules/rxjs/_esm2015/internal/operators/throttle.js @@ -1,11 +1,10 @@ -import { OuterSubscriber } from '../OuterSubscriber'; -import { subscribeToResult } from '../util/subscribeToResult'; +import { SimpleOuterSubscriber, innerSubscribe, SimpleInnerSubscriber } from '../innerSubscribe'; export const defaultThrottleConfig = { leading: true, trailing: false }; export function throttle(durationSelector, config = defaultThrottleConfig) { - return (source) => source.lift(new ThrottleOperator(durationSelector, config.leading, config.trailing)); + return (source) => source.lift(new ThrottleOperator(durationSelector, !!config.leading, !!config.trailing)); } class ThrottleOperator { constructor(durationSelector, leading, trailing) { @@ -17,7 +16,7 @@ class ThrottleOperator { return source.subscribe(new ThrottleSubscriber(subscriber, this.durationSelector, this.leading, this.trailing)); } } -class ThrottleSubscriber extends OuterSubscriber { +class ThrottleSubscriber extends SimpleOuterSubscriber { constructor(destination, durationSelector, _leading, _trailing) { super(destination); this.destination = destination; @@ -45,12 +44,12 @@ class ThrottleSubscriber extends OuterSubscriber { this.throttle(_sendValue); } this._hasValue = false; - this._sendValue = null; + this._sendValue = undefined; } throttle(value) { const duration = this.tryDurationSelector(value); if (!!duration) { - this.add(this._throttled = subscribeToResult(this, duration)); + this.add(this._throttled = innerSubscribe(duration, new SimpleInnerSubscriber(this))); } } tryDurationSelector(value) { @@ -67,12 +66,12 @@ class ThrottleSubscriber extends OuterSubscriber { if (_throttled) { _throttled.unsubscribe(); } - this._throttled = null; + this._throttled = undefined; if (_trailing) { this.send(); } } - notifyNext(outerValue, innerValue, outerIndex, innerIndex, innerSub) { + notifyNext() { this.throttlingDone(); } notifyComplete() {