X-Git-Url: https://git.josue.xyz/?p=dotfiles%2F.git;a=blobdiff_plain;f=.config%2Fcoc%2Fextensions%2Fnode_modules%2Fcoc-prettier%2Fnode_modules%2Frxjs%2Fsrc%2Finternal%2Foperators%2FonErrorResumeNext.ts;h=104ed9f5a4603825a761b4efb11e63f385e0e414;hp=058ca8ec0cd0aba1435d7f6f6cdbb4bce6c174e7;hb=4d07c77cf4d78cab8639e13ddc3c22495e585b0b;hpb=b3950616b54221c40a7dab9099bda675007e5b6e diff --git a/.config/coc/extensions/node_modules/coc-prettier/node_modules/rxjs/src/internal/operators/onErrorResumeNext.ts b/.config/coc/extensions/node_modules/coc-prettier/node_modules/rxjs/src/internal/operators/onErrorResumeNext.ts index 058ca8ec..104ed9f5 100644 --- a/.config/coc/extensions/node_modules/coc-prettier/node_modules/rxjs/src/internal/operators/onErrorResumeNext.ts +++ b/.config/coc/extensions/node_modules/coc-prettier/node_modules/rxjs/src/internal/operators/onErrorResumeNext.ts @@ -4,10 +4,8 @@ import { Operator } from '../Operator'; import { Subscriber } from '../Subscriber'; import { Subscription } from '../Subscription'; import { isArray } from '../util/isArray'; -import { OuterSubscriber } from '../OuterSubscriber'; -import { InnerSubscriber } from '../InnerSubscriber'; -import { subscribeToResult } from '../util/subscribeToResult'; import { ObservableInput, OperatorFunction } from '../types'; +import { SimpleOuterSubscriber, SimpleInnerSubscriber, innerSubscribe } from '../innerSubscribe'; /* tslint:disable:max-line-length */ export function onErrorResumeNext(): OperatorFunction; @@ -113,14 +111,15 @@ export function onErrorResumeNextStatic(array: ObservableInput[]): Obser export function onErrorResumeNextStatic(...nextSources: Array | Array> | ((...values: Array) => R)>): Observable { - let source: ObservableInput = null; + let source: ObservableInput|undefined = undefined; if (nextSources.length === 1 && isArray(nextSources[0])) { - nextSources = >>nextSources[0]; + nextSources = nextSources[0] as ObservableInput[]; } - source = nextSources.shift(); + // TODO: resolve issue with passing no arguments. + source = nextSources.shift()!; - return from(source, null).lift(new OnErrorResumeNextOperator(nextSources)); + return from(source).lift(new OnErrorResumeNextOperator(nextSources)); } class OnErrorResumeNextOperator implements Operator { @@ -132,17 +131,17 @@ class OnErrorResumeNextOperator implements Operator { } } -class OnErrorResumeNextSubscriber extends OuterSubscriber { +class OnErrorResumeNextSubscriber extends SimpleOuterSubscriber { constructor(protected destination: Subscriber, private nextSources: Array>) { super(destination); } - notifyError(error: any, innerSub: InnerSubscriber): void { + notifyError(): void { this.subscribeToNextSource(); } - notifyComplete(innerSub: InnerSubscriber): void { + notifyComplete(): void { this.subscribeToNextSource(); } @@ -159,10 +158,10 @@ class OnErrorResumeNextSubscriber extends OuterSubscriber { private subscribeToNextSource(): void { const next = this.nextSources.shift(); if (!!next) { - const innerSubscriber = new InnerSubscriber(this, undefined, undefined); + const innerSubscriber = new SimpleInnerSubscriber(this); const destination = this.destination as Subscription; destination.add(innerSubscriber); - const innerSubscription = subscribeToResult(this, next, undefined, undefined, innerSubscriber); + const innerSubscription = innerSubscribe(next, innerSubscriber); // The returned subscription will usually be the subscriber that was // passed. However, interop subscribers will be wrapped and for // unsubscriptions to chain correctly, the wrapper needs to be added, too.