wishthis/node_modules/rxjs/dist/esm5/internal/operators/exhaustAll.js

21 lines
821 B
JavaScript
Raw Normal View History

2022-06-08 10:36:39 +00:00
import { operate } from '../util/lift';
import { innerFrom } from '../observable/innerFrom';
import { createOperatorSubscriber } from './OperatorSubscriber';
export function exhaustAll() {
return operate(function (source, subscriber) {
var isComplete = false;
var innerSub = null;
source.subscribe(createOperatorSubscriber(subscriber, function (inner) {
if (!innerSub) {
innerSub = innerFrom(inner).subscribe(createOperatorSubscriber(subscriber, undefined, function () {
innerSub = null;
isComplete && subscriber.complete();
}));
}
}, function () {
isComplete = true;
!innerSub && subscriber.complete();
}));
});
}
//# sourceMappingURL=exhaustAll.js.map