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

21 lines
797 B
JavaScript
Raw Normal View History

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