This repository has been archived on 2024-07-27. You can view files and clone it, but cannot push or open issues or pull requests.
keksAccountGUI/node_modulesOLD/rxjs/internal/observable/onErrorResumeNext.js

29 lines
1.1 KiB
JavaScript
Raw Permalink Normal View History

2019-08-11 18:48:02 +00:00
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var Observable_1 = require("../Observable");
var from_1 = require("./from");
var isArray_1 = require("../util/isArray");
var empty_1 = require("./empty");
function onErrorResumeNext() {
var sources = [];
for (var _i = 0; _i < arguments.length; _i++) {
sources[_i] = arguments[_i];
}
if (sources.length === 0) {
return empty_1.EMPTY;
}
var first = sources[0], remainder = sources.slice(1);
if (sources.length === 1 && isArray_1.isArray(first)) {
return onErrorResumeNext.apply(void 0, first);
}
return new Observable_1.Observable(function (subscriber) {
var subNext = function () { return subscriber.add(onErrorResumeNext.apply(void 0, remainder).subscribe(subscriber)); };
return from_1.from(first).subscribe({
next: function (value) { subscriber.next(value); },
error: subNext,
complete: subNext,
});
});
}
exports.onErrorResumeNext = onErrorResumeNext;
//# sourceMappingURL=onErrorResumeNext.js.map