Skip to content

Commit

Permalink
fix(tap): make next optional
Browse files Browse the repository at this point in the history
  • Loading branch information
felixfbecker committed Nov 14, 2017
1 parent cd9626a commit 71e11de
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/operator/do.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { PartialObserver } from '../Observer';
import { tap as higherOrder } from '../operators/tap';

/* tslint:disable:max-line-length */
export function _do<T>(this: Observable<T>, next: (x: T) => void, error?: (e: any) => void, complete?: () => void): Observable<T>;
export function _do<T>(this: Observable<T>, next?: (x: T) => void, error?: (e: any) => void, complete?: () => void): Observable<T>;
export function _do<T>(this: Observable<T>, observer: PartialObserver<T>): Observable<T>;
/* tslint:enable:max-line-length */

Expand Down Expand Up @@ -52,7 +52,7 @@ export function _do<T>(this: Observable<T>, observer: PartialObserver<T>): Obser
* @owner Observable
*/
export function _do<T>(this: Observable<T>, nextOrObserver?: PartialObserver<T> | ((x: T) => void),
error?: (e: any) => void,
complete?: () => void): Observable<T> {
error?: (e: any) => void,
complete?: () => void): Observable<T> {
return higherOrder(<any>nextOrObserver, error, complete)(this) as Observable<T>;
}
2 changes: 1 addition & 1 deletion src/operators/tap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { noop } from '../util/noop';
import { isFunction } from '../util/isFunction';

/* tslint:disable:max-line-length */
export function tap<T>(next: (x: T) => void, error?: (e: any) => void, complete?: () => void): MonoTypeOperatorFunction<T>;
export function tap<T>(next?: (x: T) => void, error?: (e: any) => void, complete?: () => void): MonoTypeOperatorFunction<T>;
export function tap<T>(observer: PartialObserver<T>): MonoTypeOperatorFunction<T>;
/* tslint:enable:max-line-length */

Expand Down

0 comments on commit 71e11de

Please sign in to comment.