};
})();
Object.defineProperty(exports, "__esModule", { value: true });
-var OuterSubscriber_1 = require("../OuterSubscriber");
-var subscribeToResult_1 = require("../util/subscribeToResult");
+var innerSubscribe_1 = require("../innerSubscribe");
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)); };
}
ExpandSubscriber.prototype.subscribeToProjection = function (result, value, index) {
this.active++;
var destination = this.destination;
- destination.add(subscribeToResult_1.subscribeToResult(this, result, value, index));
+ destination.add(innerSubscribe_1.innerSubscribe(result, new innerSubscribe_1.SimpleInnerSubscriber(this)));
};
ExpandSubscriber.prototype._complete = function () {
this.hasCompleted = true;
}
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());
}
};
return ExpandSubscriber;
-}(OuterSubscriber_1.OuterSubscriber));
+}(innerSubscribe_1.SimpleOuterSubscriber));
exports.ExpandSubscriber = ExpandSubscriber;
//# sourceMappingURL=expand.js.map
\ No newline at end of file