diff --git a/api_guard/dist/types/index.d.ts b/api_guard/dist/types/index.d.ts index b1a2717d71..c237c227f5 100644 --- a/api_guard/dist/types/index.d.ts +++ b/api_guard/dist/types/index.d.ts @@ -435,8 +435,7 @@ export declare class Observable implements Subscribable { pipe(op1: OperatorFunction, op2: OperatorFunction, op3: OperatorFunction, op4: OperatorFunction, op5: OperatorFunction, op6: OperatorFunction, op7: OperatorFunction, op8: OperatorFunction): Observable; pipe(op1: OperatorFunction, op2: OperatorFunction, op3: OperatorFunction, op4: OperatorFunction, op5: OperatorFunction, op6: OperatorFunction, op7: OperatorFunction, op8: OperatorFunction, op9: OperatorFunction): Observable; pipe(op1: OperatorFunction, op2: OperatorFunction, op3: OperatorFunction, op4: OperatorFunction, op5: OperatorFunction, op6: OperatorFunction, op7: OperatorFunction, op8: OperatorFunction, op9: OperatorFunction, ...operations: OperatorFunction[]): Observable; - subscribe(observer?: Partial>): Subscription; - subscribe(next: (value: T) => void): Subscription; + subscribe(observerOrNext?: Partial> | ((value: T) => void)): Subscription; subscribe(next?: ((value: T) => void) | null, error?: ((error: any) => void) | null, complete?: (() => void) | null): Subscription; toPromise(): Promise; toPromise(PromiseCtor: typeof Promise): Promise; @@ -714,8 +713,7 @@ export declare function takeWhile(predicate: (value: T, index: n export declare function takeWhile(predicate: (value: T, index: number) => value is S, inclusive: false): OperatorFunction; export declare function takeWhile(predicate: (value: T, index: number) => boolean, inclusive?: boolean): MonoTypeOperatorFunction; -export declare function tap(observer?: Partial>): MonoTypeOperatorFunction; -export declare function tap(next: (value: T) => void): MonoTypeOperatorFunction; +export declare function tap(observerOrNext?: Partial> | ((value: T) => void)): MonoTypeOperatorFunction; export declare function tap(next?: ((value: T) => void) | null, error?: ((error: any) => void) | null, complete?: (() => void) | null): MonoTypeOperatorFunction; export declare type TeardownLogic = Subscription | Unsubscribable | (() => void) | void; diff --git a/api_guard/dist/types/operators/index.d.ts b/api_guard/dist/types/operators/index.d.ts index 162aeb5e70..963e5dcb55 100644 --- a/api_guard/dist/types/operators/index.d.ts +++ b/api_guard/dist/types/operators/index.d.ts @@ -283,8 +283,7 @@ export declare function takeWhile(predicate: (value: T, index: n export declare function takeWhile(predicate: (value: T, index: number) => value is S, inclusive: false): OperatorFunction; export declare function takeWhile(predicate: (value: T, index: number) => boolean, inclusive?: boolean): MonoTypeOperatorFunction; -export declare function tap(observer?: Partial>): MonoTypeOperatorFunction; -export declare function tap(next: (value: T) => void): MonoTypeOperatorFunction; +export declare function tap(observerOrNext?: Partial> | ((value: T) => void)): MonoTypeOperatorFunction; export declare function tap(next?: ((value: T) => void) | null, error?: ((error: any) => void) | null, complete?: (() => void) | null): MonoTypeOperatorFunction; export declare function throttle(durationSelector: (value: T) => ObservableInput, { leading, trailing }?: ThrottleConfig): MonoTypeOperatorFunction; diff --git a/src/internal/Observable.ts b/src/internal/Observable.ts index abab383605..9a7e903be3 100644 --- a/src/internal/Observable.ts +++ b/src/internal/Observable.ts @@ -74,8 +74,7 @@ export class Observable implements Subscribable { return observable; } - subscribe(observer?: Partial>): Subscription; - subscribe(next: (value: T) => void): Subscription; + subscribe(observerOrNext?: Partial> | ((value: T) => void)): Subscription; /** @deprecated Instead of passing separate callback arguments, use an observer argument. Signatures taking separate callback arguments will be removed in v8. Details: https://rxjs.dev/deprecations/subscribe-arguments */ subscribe(next?: ((value: T) => void) | null, error?: ((error: any) => void) | null, complete?: (() => void) | null): Subscription; /** diff --git a/src/internal/operators/tap.ts b/src/internal/operators/tap.ts index 364d4ca3eb..feaefcf70d 100644 --- a/src/internal/operators/tap.ts +++ b/src/internal/operators/tap.ts @@ -9,9 +9,7 @@ export interface TapObserver extends Observer { unsubscribe: () => void; finalize: () => void; } - -export function tap(observer?: Partial>): MonoTypeOperatorFunction; -export function tap(next: (value: T) => void): MonoTypeOperatorFunction; +export function tap(observerOrNext?: Partial> | ((value: T) => void)): MonoTypeOperatorFunction; /** @deprecated Instead of passing separate callback arguments, use an observer argument. Signatures taking separate callback arguments will be removed in v8. Details: https://rxjs.dev/deprecations/subscribe-arguments */ export function tap( next?: ((value: T) => void) | null,