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%2Fbundles%2Frxjs.umd.js;h=fecab4a28a8f660892ecb7ac7ccceb034e5b97b2;hp=ae3dc283e4fdec2ae51f31259c07e979820424f3;hb=4d07c77cf4d78cab8639e13ddc3c22495e585b0b;hpb=b3950616b54221c40a7dab9099bda675007e5b6e diff --git a/.config/coc/extensions/node_modules/coc-prettier/node_modules/rxjs/bundles/rxjs.umd.js b/.config/coc/extensions/node_modules/coc-prettier/node_modules/rxjs/bundles/rxjs.umd.js index ae3dc283..fecab4a2 100644 --- a/.config/coc/extensions/node_modules/coc-prettier/node_modules/rxjs/bundles/rxjs.umd.js +++ b/.config/coc/extensions/node_modules/coc-prettier/node_modules/rxjs/bundles/rxjs.umd.js @@ -526,6 +526,7 @@ this._parentOrParents = null; this._subscriptions = null; if (unsubscribe) { + this._ctorUnsubscribe = true; this._unsubscribe = unsubscribe; } } @@ -534,7 +535,7 @@ if (this.closed) { return; } - var _a = this, _parentOrParents = _a._parentOrParents, _unsubscribe = _a._unsubscribe, _subscriptions = _a._subscriptions; + var _a = this, _parentOrParents = _a._parentOrParents, _ctorUnsubscribe = _a._ctorUnsubscribe, _unsubscribe = _a._unsubscribe, _subscriptions = _a._subscriptions; this.closed = true; this._parentOrParents = null; this._subscriptions = null; @@ -548,6 +549,9 @@ } } if (isFunction(_unsubscribe)) { + if (_ctorUnsubscribe) { + this._unsubscribe = undefined; + } try { _unsubscribe.call(this); } @@ -2043,16 +2047,20 @@ return _this; } ReplaySubject.prototype.nextInfiniteTimeWindow = function (value) { - var _events = this._events; - _events.push(value); - if (_events.length > this._bufferSize) { - _events.shift(); + if (!this.isStopped) { + var _events = this._events; + _events.push(value); + if (_events.length > this._bufferSize) { + _events.shift(); + } } _super.prototype.next.call(this, value); }; ReplaySubject.prototype.nextTimeWindow = function (value) { - this._events.push(new ReplayEvent(this._getNow(), value)); - this._trimBufferThenGetEvents(); + if (!this.isStopped) { + this._events.push(new ReplayEvent(this._getNow(), value)); + this._trimBufferThenGetEvents(); + } _super.prototype.next.call(this, value); }; ReplaySubject.prototype._subscribe = function (subscriber) { @@ -2835,8 +2843,8 @@ for (var _i = 0; _i < arguments.length; _i++) { observables[_i] = arguments[_i]; } - var resultSelector = null; - var scheduler = null; + var resultSelector = undefined; + var scheduler = undefined; if (isScheduler(observables[observables.length - 1])) { scheduler = observables.pop(); } @@ -2882,7 +2890,7 @@ this.toRespond = len; for (var i = 0; i < len; i++) { var observable = observables[i]; - this.add(subscribeToResult(this, observable, observable, i)); + this.add(subscribeToResult(this, observable, undefined, i)); } } }; @@ -2891,7 +2899,7 @@ this.destination.complete(); } }; - CombineLatestSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) { + CombineLatestSubscriber.prototype.notifyNext = function (_outerValue, innerValue, outerIndex) { var values = this.values; var oldVal = values[outerIndex]; var toRespond = !this.toRespond @@ -3031,6 +3039,90 @@ } } + var SimpleInnerSubscriber = (function (_super) { + __extends(SimpleInnerSubscriber, _super); + function SimpleInnerSubscriber(parent) { + var _this = _super.call(this) || this; + _this.parent = parent; + return _this; + } + SimpleInnerSubscriber.prototype._next = function (value) { + this.parent.notifyNext(value); + }; + SimpleInnerSubscriber.prototype._error = function (error) { + this.parent.notifyError(error); + this.unsubscribe(); + }; + SimpleInnerSubscriber.prototype._complete = function () { + this.parent.notifyComplete(); + this.unsubscribe(); + }; + return SimpleInnerSubscriber; + }(Subscriber)); + var ComplexInnerSubscriber = (function (_super) { + __extends(ComplexInnerSubscriber, _super); + function ComplexInnerSubscriber(parent, outerValue, outerIndex) { + var _this = _super.call(this) || this; + _this.parent = parent; + _this.outerValue = outerValue; + _this.outerIndex = outerIndex; + return _this; + } + ComplexInnerSubscriber.prototype._next = function (value) { + this.parent.notifyNext(this.outerValue, value, this.outerIndex, this); + }; + ComplexInnerSubscriber.prototype._error = function (error) { + this.parent.notifyError(error); + this.unsubscribe(); + }; + ComplexInnerSubscriber.prototype._complete = function () { + this.parent.notifyComplete(this); + this.unsubscribe(); + }; + return ComplexInnerSubscriber; + }(Subscriber)); + var SimpleOuterSubscriber = (function (_super) { + __extends(SimpleOuterSubscriber, _super); + function SimpleOuterSubscriber() { + return _super !== null && _super.apply(this, arguments) || this; + } + SimpleOuterSubscriber.prototype.notifyNext = function (innerValue) { + this.destination.next(innerValue); + }; + SimpleOuterSubscriber.prototype.notifyError = function (err) { + this.destination.error(err); + }; + SimpleOuterSubscriber.prototype.notifyComplete = function () { + this.destination.complete(); + }; + return SimpleOuterSubscriber; + }(Subscriber)); + var ComplexOuterSubscriber = (function (_super) { + __extends(ComplexOuterSubscriber, _super); + function ComplexOuterSubscriber() { + return _super !== null && _super.apply(this, arguments) || this; + } + ComplexOuterSubscriber.prototype.notifyNext = function (_outerValue, innerValue, _outerIndex, _innerSub) { + this.destination.next(innerValue); + }; + ComplexOuterSubscriber.prototype.notifyError = function (error) { + this.destination.error(error); + }; + ComplexOuterSubscriber.prototype.notifyComplete = function (_innerSub) { + this.destination.complete(); + }; + return ComplexOuterSubscriber; + }(Subscriber)); + function innerSubscribe(result, innerSubscriber) { + if (innerSubscriber.closed) { + return undefined; + } + if (result instanceof Observable) { + return result.subscribe(innerSubscriber); + } + return subscribeTo(result)(innerSubscriber); + } + function mergeMap(project, resultSelector, concurrent) { if (concurrent === void 0) { concurrent = Number.POSITIVE_INFINITY; } if (typeof resultSelector === 'function') { @@ -3084,13 +3176,13 @@ return; } this.active++; - this._innerSub(result, value, index); + this._innerSub(result); }; - MergeMapSubscriber.prototype._innerSub = function (ish, value, index) { - var innerSubscriber = new InnerSubscriber(this, value, index); + MergeMapSubscriber.prototype._innerSub = function (ish) { + var innerSubscriber = new SimpleInnerSubscriber(this); var destination = this.destination; destination.add(innerSubscriber); - var innerSubscription = subscribeToResult(this, ish, undefined, undefined, innerSubscriber); + var innerSubscription = innerSubscribe(ish, innerSubscriber); if (innerSubscription !== innerSubscriber) { destination.add(innerSubscription); } @@ -3102,12 +3194,11 @@ } this.unsubscribe(); }; - MergeMapSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) { + MergeMapSubscriber.prototype.notifyNext = function (innerValue) { this.destination.next(innerValue); }; - MergeMapSubscriber.prototype.notifyComplete = function (innerSub) { + MergeMapSubscriber.prototype.notifyComplete = function () { var buffer = this.buffer; - this.remove(innerSub); this.active--; if (buffer.length > 0) { this._next(buffer.shift()); @@ -3117,7 +3208,7 @@ } }; return MergeMapSubscriber; - }(OuterSubscriber)); + }(SimpleOuterSubscriber)); var flatMap = mergeMap; function mergeAll(concurrent) { @@ -3636,7 +3727,7 @@ else { for (var i = 0; i < len && !this.hasFirst; i++) { var observable = observables[i]; - var subscription = subscribeToResult(this, observable, observable, i); + var subscription = subscribeToResult(this, observable, undefined, i); if (this.subscriptions) { this.subscriptions.push(subscription); } @@ -3645,7 +3736,7 @@ this.observables = null; } }; - RaceSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) { + RaceSubscriber.prototype.notifyNext = function (_outerValue, innerValue, outerIndex) { if (!this.hasFirst) { this.hasFirst = true; for (var i = 0; i < this.subscriptions.length; i++) { @@ -3794,10 +3885,10 @@ function ZipSubscriber(destination, resultSelector, values) { if (values === void 0) { values = Object.create(null); } var _this = _super.call(this, destination) || this; + _this.resultSelector = resultSelector; _this.iterators = []; _this.active = 0; - _this.resultSelector = (typeof resultSelector === 'function') ? resultSelector : null; - _this.values = values; + _this.resultSelector = (typeof resultSelector === 'function') ? resultSelector : undefined; return _this; } ZipSubscriber.prototype._next = function (value) { @@ -3825,7 +3916,7 @@ var iterator$$1 = iterators[i]; if (iterator$$1.stillUnsubscribed) { var destination = this.destination; - destination.add(iterator$$1.subscribe(iterator$$1, i)); + destination.add(iterator$$1.subscribe()); } else { this.active--; @@ -3900,7 +3991,7 @@ }; StaticIterator.prototype.hasCompleted = function () { var nextResult = this.nextResult; - return nextResult && nextResult.done; + return Boolean(nextResult && nextResult.done); }; return StaticIterator; }()); @@ -3965,15 +4056,15 @@ this.destination.complete(); } }; - ZipBufferIterator.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) { + ZipBufferIterator.prototype.notifyNext = function (innerValue) { this.buffer.push(innerValue); this.parent.checkIterators(); }; - ZipBufferIterator.prototype.subscribe = function (value, index) { - return subscribeToResult(this, this.observable, this, index); + ZipBufferIterator.prototype.subscribe = function () { + return innerSubscribe(this.observable, new SimpleInnerSubscriber(this)); }; return ZipBufferIterator; - }(OuterSubscriber)); + }(SimpleOuterSubscriber)); function audit(durationSelector) { return function auditOperatorFunction(source) { @@ -4009,7 +4100,7 @@ catch (err) { return this.destination.error(err); } - var innerSubscription = subscribeToResult(this, duration); + var innerSubscription = innerSubscribe(duration, new SimpleInnerSubscriber(this)); if (!innerSubscription || innerSubscription.closed) { this.clearThrottle(); } @@ -4022,23 +4113,23 @@ var _a = this, value = _a.value, hasValue = _a.hasValue, throttled = _a.throttled; if (throttled) { this.remove(throttled); - this.throttled = null; + this.throttled = undefined; throttled.unsubscribe(); } if (hasValue) { - this.value = null; + this.value = undefined; this.hasValue = false; this.destination.next(value); } }; - AuditSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex) { + AuditSubscriber.prototype.notifyNext = function () { this.clearThrottle(); }; AuditSubscriber.prototype.notifyComplete = function () { this.clearThrottle(); }; return AuditSubscriber; - }(OuterSubscriber)); + }(SimpleOuterSubscriber)); function auditTime(duration, scheduler) { if (scheduler === void 0) { scheduler = async; } @@ -4064,19 +4155,19 @@ function BufferSubscriber(destination, closingNotifier) { var _this = _super.call(this, destination) || this; _this.buffer = []; - _this.add(subscribeToResult(_this, closingNotifier)); + _this.add(innerSubscribe(closingNotifier, new SimpleInnerSubscriber(_this))); return _this; } BufferSubscriber.prototype._next = function (value) { this.buffer.push(value); }; - BufferSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) { + BufferSubscriber.prototype.notifyNext = function () { var buffer = this.buffer; this.buffer = []; this.destination.next(buffer); }; return BufferSubscriber; - }(OuterSubscriber)); + }(SimpleOuterSubscriber)); function bufferCount(bufferSize, startBufferEvery) { if (startBufferEvery === void 0) { startBufferEvery = null; } @@ -4325,7 +4416,6 @@ __extends(BufferToggleSubscriber, _super); function BufferToggleSubscriber(destination, openings, closingSelector) { var _this = _super.call(this, destination) || this; - _this.openings = openings; _this.closingSelector = closingSelector; _this.contexts = []; _this.add(subscribeToResult(_this, openings)); @@ -4361,7 +4451,7 @@ this.contexts = null; _super.prototype._complete.call(this); }; - BufferToggleSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) { + BufferToggleSubscriber.prototype.notifyNext = function (outerValue, innerValue) { outerValue ? this.closeBuffer(outerValue) : this.openBuffer(innerValue); }; BufferToggleSubscriber.prototype.notifyComplete = function (innerSub) { @@ -4442,10 +4532,10 @@ _super.prototype._complete.call(this); }; BufferWhenSubscriber.prototype._unsubscribe = function () { - this.buffer = null; + this.buffer = undefined; this.subscribing = false; }; - BufferWhenSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) { + BufferWhenSubscriber.prototype.notifyNext = function () { this.openBuffer(); }; BufferWhenSubscriber.prototype.notifyComplete = function () { @@ -4479,11 +4569,11 @@ this.closingSubscription = closingSubscription; this.add(closingSubscription); this.subscribing = true; - closingSubscription.add(subscribeToResult(this, closingNotifier)); + closingSubscription.add(innerSubscribe(closingNotifier, new SimpleInnerSubscriber(this))); this.subscribing = false; }; return BufferWhenSubscriber; - }(OuterSubscriber)); + }(SimpleOuterSubscriber)); function catchError(selector) { return function catchErrorOperatorFunction(source) { @@ -4520,16 +4610,16 @@ return; } this._unsubscribeAndRecycle(); - var innerSubscriber = new InnerSubscriber(this, undefined, undefined); + var innerSubscriber = new SimpleInnerSubscriber(this); this.add(innerSubscriber); - var innerSubscription = subscribeToResult(this, result, undefined, undefined, innerSubscriber); + var innerSubscription = innerSubscribe(result, innerSubscriber); if (innerSubscription !== innerSubscriber) { this.add(innerSubscription); } } }; return CatchSubscriber; - }(OuterSubscriber)); + }(SimpleOuterSubscriber)); function combineAll(project) { return function (source) { return source.lift(new CombineLatestOperator(project)); }; @@ -4635,7 +4725,6 @@ var _this = _super.call(this, destination) || this; _this.durationSelector = durationSelector; _this.hasValue = false; - _this.durationSubscription = null; return _this; } DebounceSubscriber.prototype._next = function (value) { @@ -4661,12 +4750,12 @@ subscription.unsubscribe(); this.remove(subscription); } - subscription = subscribeToResult(this, duration); + subscription = innerSubscribe(duration, new SimpleInnerSubscriber(this)); if (subscription && !subscription.closed) { this.add(this.durationSubscription = subscription); } }; - DebounceSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) { + DebounceSubscriber.prototype.notifyNext = function () { this.emitValue(); }; DebounceSubscriber.prototype.notifyComplete = function () { @@ -4677,17 +4766,17 @@ var value = this.value; var subscription = this.durationSubscription; if (subscription) { - this.durationSubscription = null; + this.durationSubscription = undefined; subscription.unsubscribe(); this.remove(subscription); } - this.value = null; + this.value = undefined; this.hasValue = false; _super.prototype._next.call(this, value); } }; return DebounceSubscriber; - }(OuterSubscriber)); + }(SimpleOuterSubscriber)); function debounceTime(dueTime, scheduler) { if (scheduler === void 0) { scheduler = async; } @@ -4898,7 +4987,7 @@ _this.index = 0; return _this; } - DelayWhenSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) { + DelayWhenSubscriber.prototype.notifyNext = function (outerValue, _innerValue, _outerIndex, _innerIndex, innerSub) { this.destination.next(outerValue); this.removeSubscription(innerSub); this.tryComplete(); @@ -5040,14 +5129,14 @@ _this.keySelector = keySelector; _this.values = new Set(); if (flushes) { - _this.add(subscribeToResult(_this, flushes)); + _this.add(innerSubscribe(flushes, new SimpleInnerSubscriber(_this))); } return _this; } - DistinctSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) { + DistinctSubscriber.prototype.notifyNext = function () { this.values.clear(); }; - DistinctSubscriber.prototype.notifyError = function (error, innerSub) { + DistinctSubscriber.prototype.notifyError = function (error) { this._error(error); }; DistinctSubscriber.prototype._next = function (value) { @@ -5078,7 +5167,7 @@ } }; return DistinctSubscriber; - }(OuterSubscriber)); + }(SimpleOuterSubscriber)); function distinctUntilChanged(compare, keySelector) { return function (source) { return source.lift(new DistinctUntilChangedOperator(compare, keySelector)); }; @@ -5321,7 +5410,7 @@ SwitchFirstSubscriber.prototype._next = function (value) { if (!this.hasSubscription) { this.hasSubscription = true; - this.add(subscribeToResult(this, value)); + this.add(innerSubscribe(value, new SimpleInnerSubscriber(this))); } }; SwitchFirstSubscriber.prototype._complete = function () { @@ -5330,15 +5419,14 @@ this.destination.complete(); } }; - SwitchFirstSubscriber.prototype.notifyComplete = function (innerSub) { - this.remove(innerSub); + SwitchFirstSubscriber.prototype.notifyComplete = function () { this.hasSubscription = false; if (this.hasCompleted) { this.destination.complete(); } }; return SwitchFirstSubscriber; - }(OuterSubscriber)); + }(SimpleOuterSubscriber)); function exhaustMap(project, resultSelector) { if (resultSelector) { @@ -5383,13 +5471,13 @@ return; } this.hasSubscription = true; - this._innerSub(result, value, index); + this._innerSub(result); }; - ExhaustMapSubscriber.prototype._innerSub = function (result, value, index) { - var innerSubscriber = new InnerSubscriber(this, value, index); + ExhaustMapSubscriber.prototype._innerSub = function (result) { + var innerSubscriber = new SimpleInnerSubscriber(this); var destination = this.destination; destination.add(innerSubscriber); - var innerSubscription = subscribeToResult(this, result, undefined, undefined, innerSubscriber); + var innerSubscription = innerSubscribe(result, innerSubscriber); if (innerSubscription !== innerSubscriber) { destination.add(innerSubscription); } @@ -5401,26 +5489,23 @@ } this.unsubscribe(); }; - ExhaustMapSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) { + ExhaustMapSubscriber.prototype.notifyNext = function (innerValue) { this.destination.next(innerValue); }; ExhaustMapSubscriber.prototype.notifyError = function (err) { this.destination.error(err); }; - ExhaustMapSubscriber.prototype.notifyComplete = function (innerSub) { - var destination = this.destination; - destination.remove(innerSub); + ExhaustMapSubscriber.prototype.notifyComplete = function () { this.hasSubscription = false; if (this.hasCompleted) { this.destination.complete(); } }; return ExhaustMapSubscriber; - }(OuterSubscriber)); + }(SimpleOuterSubscriber)); function expand(project, concurrent, scheduler) { if (concurrent === void 0) { concurrent = Number.POSITIVE_INFINITY; } - if (scheduler === void 0) { scheduler = undefined; } concurrent = (concurrent || 0) < 1 ? Number.POSITIVE_INFINITY : concurrent; return function (source) { return source.lift(new ExpandOperator(project, concurrent, scheduler)); }; } @@ -5486,7 +5571,7 @@ ExpandSubscriber.prototype.subscribeToProjection = function (result, value, index) { this.active++; var destination = this.destination; - destination.add(subscribeToResult(this, result, value, index)); + destination.add(innerSubscribe(result, new SimpleInnerSubscriber(this))); }; ExpandSubscriber.prototype._complete = function () { this.hasCompleted = true; @@ -5495,13 +5580,11 @@ } this.unsubscribe(); }; - ExpandSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) { + ExpandSubscriber.prototype.notifyNext = function (innerValue) { this._next(innerValue); }; - ExpandSubscriber.prototype.notifyComplete = function (innerSub) { + ExpandSubscriber.prototype.notifyComplete = function () { var buffer = this.buffer; - var destination = this.destination; - destination.remove(innerSub); this.active--; if (buffer && buffer.length > 0) { this._next(buffer.shift()); @@ -5511,7 +5594,7 @@ } }; return ExpandSubscriber; - }(OuterSubscriber)); + }(SimpleOuterSubscriber)); function finalize(callback) { return function (source) { return source.lift(new FinallyOperator(callback)); }; @@ -5919,17 +6002,17 @@ return destination.error(e); } this.active++; - this._innerSub(ish, value, index); + this._innerSub(ish); } else { this.buffer.push(value); } }; - MergeScanSubscriber.prototype._innerSub = function (ish, value, index) { - var innerSubscriber = new InnerSubscriber(this, value, index); + MergeScanSubscriber.prototype._innerSub = function (ish) { + var innerSubscriber = new SimpleInnerSubscriber(this); var destination = this.destination; destination.add(innerSubscriber); - var innerSubscription = subscribeToResult(this, ish, undefined, undefined, innerSubscriber); + var innerSubscription = innerSubscribe(ish, innerSubscriber); if (innerSubscription !== innerSubscriber) { destination.add(innerSubscription); } @@ -5944,16 +6027,14 @@ } this.unsubscribe(); }; - MergeScanSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) { + MergeScanSubscriber.prototype.notifyNext = function (innerValue) { var destination = this.destination; this.acc = innerValue; this.hasValue = true; destination.next(innerValue); }; - MergeScanSubscriber.prototype.notifyComplete = function (innerSub) { + MergeScanSubscriber.prototype.notifyComplete = function () { var buffer = this.buffer; - var destination = this.destination; - destination.remove(innerSub); this.active--; if (buffer.length > 0) { this._next(buffer.shift()); @@ -5966,7 +6047,7 @@ } }; return MergeScanSubscriber; - }(OuterSubscriber)); + }(SimpleOuterSubscriber)); function min(comparer) { var min = (typeof comparer === 'function') @@ -6037,10 +6118,10 @@ _this.nextSources = nextSources; return _this; } - OnErrorResumeNextSubscriber.prototype.notifyError = function (error, innerSub) { + OnErrorResumeNextSubscriber.prototype.notifyError = function () { this.subscribeToNextSource(); }; - OnErrorResumeNextSubscriber.prototype.notifyComplete = function (innerSub) { + OnErrorResumeNextSubscriber.prototype.notifyComplete = function () { this.subscribeToNextSource(); }; OnErrorResumeNextSubscriber.prototype._error = function (err) { @@ -6054,10 +6135,10 @@ OnErrorResumeNextSubscriber.prototype.subscribeToNextSource = function () { var next = this.nextSources.shift(); if (!!next) { - var innerSubscriber = new InnerSubscriber(this, undefined, undefined); + var innerSubscriber = new SimpleInnerSubscriber(this); var destination = this.destination; destination.add(innerSubscriber); - var innerSubscription = subscribeToResult(this, next, undefined, undefined, innerSubscriber); + var innerSubscription = innerSubscribe(next, innerSubscriber); if (innerSubscription !== innerSubscriber) { destination.add(innerSubscription); } @@ -6067,7 +6148,7 @@ } }; return OnErrorResumeNextSubscriber; - }(OuterSubscriber)); + }(SimpleOuterSubscriber)); function pairwise() { return function (source) { return source.lift(new PairwiseOperator()); }; @@ -6242,11 +6323,11 @@ _this.sourceIsBeingSubscribedTo = true; return _this; } - RepeatWhenSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) { + RepeatWhenSubscriber.prototype.notifyNext = function () { this.sourceIsBeingSubscribedTo = true; this.source.subscribe(this); }; - RepeatWhenSubscriber.prototype.notifyComplete = function (innerSub) { + RepeatWhenSubscriber.prototype.notifyComplete = function () { if (this.sourceIsBeingSubscribedTo === false) { return _super.prototype.complete.call(this); } @@ -6261,20 +6342,20 @@ return _super.prototype.complete.call(this); } this._unsubscribeAndRecycle(); - this.notifications.next(); + this.notifications.next(undefined); } }; RepeatWhenSubscriber.prototype._unsubscribe = function () { var _a = this, notifications = _a.notifications, retriesSubscription = _a.retriesSubscription; if (notifications) { notifications.unsubscribe(); - this.notifications = null; + this.notifications = undefined; } if (retriesSubscription) { retriesSubscription.unsubscribe(); - this.retriesSubscription = null; + this.retriesSubscription = undefined; } - this.retries = null; + this.retries = undefined; }; RepeatWhenSubscriber.prototype._unsubscribeAndRecycle = function () { var _unsubscribe = this._unsubscribe; @@ -6294,10 +6375,10 @@ return _super.prototype.complete.call(this); } this.retries = retries; - this.retriesSubscription = subscribeToResult(this, retries); + this.retriesSubscription = innerSubscribe(retries, new SimpleInnerSubscriber(this)); }; return RepeatWhenSubscriber; - }(OuterSubscriber)); + }(SimpleOuterSubscriber)); function retry(count) { if (count === void 0) { count = -1; } @@ -6371,11 +6452,11 @@ catch (e) { return _super.prototype.error.call(this, e); } - retriesSubscription = subscribeToResult(this, retries); + retriesSubscription = innerSubscribe(retries, new SimpleInnerSubscriber(this)); } else { - this.errors = null; - this.retriesSubscription = null; + this.errors = undefined; + this.retriesSubscription = undefined; } this._unsubscribeAndRecycle(); this.errors = errors; @@ -6388,15 +6469,15 @@ var _a = this, errors = _a.errors, retriesSubscription = _a.retriesSubscription; if (errors) { errors.unsubscribe(); - this.errors = null; + this.errors = undefined; } if (retriesSubscription) { retriesSubscription.unsubscribe(); - this.retriesSubscription = null; + this.retriesSubscription = undefined; } - this.retries = null; + this.retries = undefined; }; - RetryWhenSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) { + RetryWhenSubscriber.prototype.notifyNext = function () { var _unsubscribe = this._unsubscribe; this._unsubscribe = null; this._unsubscribeAndRecycle(); @@ -6404,7 +6485,7 @@ this.source.subscribe(this); }; return RetryWhenSubscriber; - }(OuterSubscriber)); + }(SimpleOuterSubscriber)); function sample(notifier) { return function (source) { return source.lift(new SampleOperator(notifier)); }; @@ -6416,7 +6497,7 @@ SampleOperator.prototype.call = function (subscriber, source) { var sampleSubscriber = new SampleSubscriber(subscriber); var subscription = source.subscribe(sampleSubscriber); - subscription.add(subscribeToResult(sampleSubscriber, this.notifier)); + subscription.add(innerSubscribe(this.notifier, new SimpleInnerSubscriber(sampleSubscriber))); return subscription; }; return SampleOperator; @@ -6432,7 +6513,7 @@ this.value = value; this.hasValue = true; }; - SampleSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) { + SampleSubscriber.prototype.notifyNext = function () { this.emitValue(); }; SampleSubscriber.prototype.notifyComplete = function () { @@ -6445,7 +6526,7 @@ } }; return SampleSubscriber; - }(OuterSubscriber)); + }(SimpleOuterSubscriber)); function sampleTime(period, scheduler) { if (scheduler === void 0) { scheduler = async; } @@ -6813,10 +6894,10 @@ function SkipUntilSubscriber(destination, notifier) { var _this = _super.call(this, destination) || this; _this.hasValue = false; - var innerSubscriber = new InnerSubscriber(_this, undefined, undefined); + var innerSubscriber = new SimpleInnerSubscriber(_this); _this.add(innerSubscriber); _this.innerSubscription = innerSubscriber; - var innerSubscription = subscribeToResult(_this, notifier, undefined, undefined, innerSubscriber); + var innerSubscription = innerSubscribe(notifier, innerSubscriber); if (innerSubscription !== innerSubscriber) { _this.add(innerSubscription); _this.innerSubscription = innerSubscription; @@ -6828,7 +6909,7 @@ _super.prototype._next.call(this, value); } }; - SkipUntilSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) { + SkipUntilSubscriber.prototype.notifyNext = function () { this.hasValue = true; if (this.innerSubscription) { this.innerSubscription.unsubscribe(); @@ -6837,7 +6918,7 @@ SkipUntilSubscriber.prototype.notifyComplete = function () { }; return SkipUntilSubscriber; - }(OuterSubscriber)); + }(SimpleOuterSubscriber)); function skipWhile(predicate) { return function (source) { return source.lift(new SkipWhileOperator(predicate)); }; @@ -6983,17 +7064,17 @@ this.destination.error(error); return; } - this._innerSub(result, value, index); + this._innerSub(result); }; - SwitchMapSubscriber.prototype._innerSub = function (result, value, index) { + SwitchMapSubscriber.prototype._innerSub = function (result) { var innerSubscription = this.innerSubscription; if (innerSubscription) { innerSubscription.unsubscribe(); } - var innerSubscriber = new InnerSubscriber(this, value, index); + var innerSubscriber = new SimpleInnerSubscriber(this); var destination = this.destination; destination.add(innerSubscriber); - this.innerSubscription = subscribeToResult(this, result, undefined, undefined, innerSubscriber); + this.innerSubscription = innerSubscribe(result, innerSubscriber); if (this.innerSubscription !== innerSubscriber) { destination.add(this.innerSubscription); } @@ -7006,21 +7087,19 @@ this.unsubscribe(); }; SwitchMapSubscriber.prototype._unsubscribe = function () { - this.innerSubscription = null; + this.innerSubscription = undefined; }; - SwitchMapSubscriber.prototype.notifyComplete = function (innerSub) { - var destination = this.destination; - destination.remove(innerSub); - this.innerSubscription = null; + SwitchMapSubscriber.prototype.notifyComplete = function () { + this.innerSubscription = undefined; if (this.isStopped) { _super.prototype._complete.call(this); } }; - SwitchMapSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) { + SwitchMapSubscriber.prototype.notifyNext = function (innerValue) { this.destination.next(innerValue); }; return SwitchMapSubscriber; - }(OuterSubscriber)); + }(SimpleOuterSubscriber)); function switchAll() { return switchMap(identity); @@ -7039,7 +7118,7 @@ } TakeUntilOperator.prototype.call = function (subscriber, source) { var takeUntilSubscriber = new TakeUntilSubscriber(subscriber); - var notifierSubscription = subscribeToResult(takeUntilSubscriber, this.notifier); + var notifierSubscription = innerSubscribe(this.notifier, new SimpleInnerSubscriber(takeUntilSubscriber)); if (notifierSubscription && !takeUntilSubscriber.seenValue) { takeUntilSubscriber.add(notifierSubscription); return source.subscribe(takeUntilSubscriber); @@ -7055,14 +7134,14 @@ _this.seenValue = false; return _this; } - TakeUntilSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) { + TakeUntilSubscriber.prototype.notifyNext = function () { this.seenValue = true; this.complete(); }; TakeUntilSubscriber.prototype.notifyComplete = function () { }; return TakeUntilSubscriber; - }(OuterSubscriber)); + }(SimpleOuterSubscriber)); function takeWhile(predicate, inclusive) { if (inclusive === void 0) { inclusive = false; } @@ -7192,7 +7271,7 @@ }; function throttle(durationSelector, config) { if (config === void 0) { config = defaultThrottleConfig; } - return function (source) { return source.lift(new ThrottleOperator(durationSelector, config.leading, config.trailing)); }; + return function (source) { return source.lift(new ThrottleOperator(durationSelector, !!config.leading, !!config.trailing)); }; } var ThrottleOperator = (function () { function ThrottleOperator(durationSelector, leading, trailing) { @@ -7235,12 +7314,12 @@ this.throttle(_sendValue); } this._hasValue = false; - this._sendValue = null; + this._sendValue = undefined; }; ThrottleSubscriber.prototype.throttle = function (value) { var duration = this.tryDurationSelector(value); if (!!duration) { - this.add(this._throttled = subscribeToResult(this, duration)); + this.add(this._throttled = innerSubscribe(duration, new SimpleInnerSubscriber(this))); } }; ThrottleSubscriber.prototype.tryDurationSelector = function (value) { @@ -7257,19 +7336,19 @@ if (_throttled) { _throttled.unsubscribe(); } - this._throttled = null; + this._throttled = undefined; if (_trailing) { this.send(); } }; - ThrottleSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) { + ThrottleSubscriber.prototype.notifyNext = function () { this.throttlingDone(); }; ThrottleSubscriber.prototype.notifyComplete = function () { this.throttlingDone(); }; return ThrottleSubscriber; - }(OuterSubscriber)); + }(SimpleOuterSubscriber)); function throttleTime(duration, scheduler, config) { if (scheduler === void 0) { scheduler = async; } @@ -7395,14 +7474,13 @@ _this.waitFor = waitFor; _this.withObservable = withObservable; _this.scheduler = scheduler; - _this.action = null; _this.scheduleTimeout(); return _this; } TimeoutWithSubscriber.dispatchTimeout = function (subscriber) { var withObservable = subscriber.withObservable; subscriber._unsubscribeAndRecycle(); - subscriber.add(subscribeToResult(subscriber, withObservable)); + subscriber.add(innerSubscribe(withObservable, new SimpleInnerSubscriber(subscriber))); }; TimeoutWithSubscriber.prototype.scheduleTimeout = function () { var action = this.action; @@ -7420,12 +7498,12 @@ _super.prototype._next.call(this, value); }; TimeoutWithSubscriber.prototype._unsubscribe = function () { - this.action = null; + this.action = undefined; this.scheduler = null; this.withObservable = null; }; return TimeoutWithSubscriber; - }(OuterSubscriber)); + }(SimpleOuterSubscriber)); function timeout(due, scheduler) { if (scheduler === void 0) { scheduler = async; } @@ -7468,7 +7546,7 @@ var windowSubscriber = new WindowSubscriber(subscriber); var sourceSubscription = source.subscribe(windowSubscriber); if (!sourceSubscription.closed) { - windowSubscriber.add(subscribeToResult(windowSubscriber, this.windowBoundaries)); + windowSubscriber.add(innerSubscribe(this.windowBoundaries, new SimpleInnerSubscriber(windowSubscriber))); } return sourceSubscription; }; @@ -7482,13 +7560,13 @@ destination.next(_this.window); return _this; } - WindowSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) { + WindowSubscriber.prototype.notifyNext = function () { this.openWindow(); }; - WindowSubscriber.prototype.notifyError = function (error, innerSub) { + WindowSubscriber.prototype.notifyError = function (error) { this._error(error); }; - WindowSubscriber.prototype.notifyComplete = function (innerSub) { + WindowSubscriber.prototype.notifyComplete = function () { this._complete(); }; WindowSubscriber.prototype._next = function (value) { @@ -7515,7 +7593,7 @@ destination.next(newWindow); }; return WindowSubscriber; - }(OuterSubscriber)); + }(SimpleOuterSubscriber)); function windowCount(windowSize, startWindowEvery) { if (startWindowEvery === void 0) { startWindowEvery = 0; } @@ -7883,10 +7961,10 @@ _this.openWindow(); return _this; } - WindowSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) { + WindowSubscriber.prototype.notifyNext = function (_outerValue, _innerValue, _outerIndex, _innerIndex, innerSub) { this.openWindow(innerSub); }; - WindowSubscriber.prototype.notifyError = function (error, innerSub) { + WindowSubscriber.prototype.notifyError = function (error) { this._error(error); }; WindowSubscriber.prototype.notifyComplete = function (innerSub) { @@ -7975,11 +8053,11 @@ } for (var i = 0; i < len; i++) { var observable = observables[i]; - _this.add(subscribeToResult(_this, observable, observable, i)); + _this.add(subscribeToResult(_this, observable, undefined, i)); } return _this; } - WithLatestFromSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) { + WithLatestFromSubscriber.prototype.notifyNext = function (_outerValue, innerValue, outerIndex) { this.values[outerIndex] = innerValue; var toRespond = this.toRespond; if (toRespond.length > 0) {