diff --git a/src/operator/do.ts b/src/operator/do.ts index ed398997f4..09220a068b 100644 --- a/src/operator/do.ts +++ b/src/operator/do.ts @@ -4,7 +4,7 @@ import { PartialObserver } from '../Observer'; import { tap as higherOrder } from '../operators/tap'; /* tslint:disable:max-line-length */ -export function _do(this: Observable, next: (x: T) => void, error?: (e: any) => void, complete?: () => void): Observable; +export function _do(this: Observable, next?: (x: T) => void, error?: (e: any) => void, complete?: () => void): Observable; export function _do(this: Observable, observer: PartialObserver): Observable; /* tslint:enable:max-line-length */ @@ -52,7 +52,7 @@ export function _do(this: Observable, observer: PartialObserver): Obser * @owner Observable */ export function _do(this: Observable, nextOrObserver?: PartialObserver | ((x: T) => void), - error?: (e: any) => void, - complete?: () => void): Observable { + error?: (e: any) => void, + complete?: () => void): Observable { return higherOrder(nextOrObserver, error, complete)(this) as Observable; } diff --git a/src/operators/tap.ts b/src/operators/tap.ts index b9e43128c4..999f688351 100644 --- a/src/operators/tap.ts +++ b/src/operators/tap.ts @@ -8,7 +8,7 @@ import { noop } from '../util/noop'; import { isFunction } from '../util/isFunction'; /* tslint:disable:max-line-length */ -export function tap(next: (x: T) => void, error?: (e: any) => void, complete?: () => void): MonoTypeOperatorFunction; +export function tap(next?: (x: T) => void, error?: (e: any) => void, complete?: () => void): MonoTypeOperatorFunction; export function tap(observer: PartialObserver): MonoTypeOperatorFunction; /* tslint:enable:max-line-length */