wishthis/node_modules/rxjs/dist/cjs/internal/operators/exhaustAll.js
2022-04-07 09:06:43 +02:00

25 lines
No EOL
1,008 B
JavaScript

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.exhaustAll = void 0;
var lift_1 = require("../util/lift");
var innerFrom_1 = require("../observable/innerFrom");
var OperatorSubscriber_1 = require("./OperatorSubscriber");
function exhaustAll() {
return lift_1.operate(function (source, subscriber) {
var isComplete = false;
var innerSub = null;
source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (inner) {
if (!innerSub) {
innerSub = innerFrom_1.innerFrom(inner).subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, undefined, function () {
innerSub = null;
isComplete && subscriber.complete();
}));
}
}, function () {
isComplete = true;
!innerSub && subscriber.complete();
}));
});
}
exports.exhaustAll = exhaustAll;
//# sourceMappingURL=exhaustAll.js.map