2023-02-08 12:35:10 +00:00
|
|
|
import { Observable } from '../Observable';
|
2022-06-08 10:36:39 +00:00
|
|
|
import { argsOrArgArray } from '../util/argsOrArgArray';
|
2023-02-08 12:35:10 +00:00
|
|
|
import { OperatorSubscriber } from '../operators/OperatorSubscriber';
|
|
|
|
import { noop } from '../util/noop';
|
|
|
|
import { innerFrom } from './innerFrom';
|
2022-06-08 10:36:39 +00:00
|
|
|
export function onErrorResumeNext() {
|
|
|
|
var sources = [];
|
|
|
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
|
|
sources[_i] = arguments[_i];
|
|
|
|
}
|
2023-02-08 12:35:10 +00:00
|
|
|
var nextSources = argsOrArgArray(sources);
|
|
|
|
return new Observable(function (subscriber) {
|
|
|
|
var sourceIndex = 0;
|
|
|
|
var subscribeNext = function () {
|
|
|
|
if (sourceIndex < nextSources.length) {
|
|
|
|
var nextSource = void 0;
|
|
|
|
try {
|
|
|
|
nextSource = innerFrom(nextSources[sourceIndex++]);
|
|
|
|
}
|
|
|
|
catch (err) {
|
|
|
|
subscribeNext();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
var innerSubscriber = new OperatorSubscriber(subscriber, undefined, noop, noop);
|
|
|
|
nextSource.subscribe(innerSubscriber);
|
|
|
|
innerSubscriber.add(subscribeNext);
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
subscriber.complete();
|
|
|
|
}
|
|
|
|
};
|
|
|
|
subscribeNext();
|
|
|
|
});
|
2022-06-08 10:36:39 +00:00
|
|
|
}
|
|
|
|
//# sourceMappingURL=onErrorResumeNext.js.map
|