Giant blob of minor changes
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / rxjs / _esm2015 / internal / observable / onErrorResumeNext.js
1 import { Observable } from '../Observable';
2 import { from } from './from';
3 import { isArray } from '../util/isArray';
4 import { EMPTY } from './empty';
5 export function onErrorResumeNext(...sources) {
6     if (sources.length === 0) {
7         return EMPTY;
8     }
9     const [first, ...remainder] = sources;
10     if (sources.length === 1 && isArray(first)) {
11         return onErrorResumeNext(...first);
12     }
13     return new Observable(subscriber => {
14         const subNext = () => subscriber.add(onErrorResumeNext(...remainder).subscribe(subscriber));
15         return from(first).subscribe({
16             next(value) { subscriber.next(value); },
17             error: subNext,
18             complete: subNext,
19         });
20     });
21 }
22 //# sourceMappingURL=onErrorResumeNext.js.map