diff options
Diffstat (limited to 'tools/node_modules/eslint/node_modules/rxjs/src/internal/operators/tap.ts')
-rw-r--r-- | tools/node_modules/eslint/node_modules/rxjs/src/internal/operators/tap.ts | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tools/node_modules/eslint/node_modules/rxjs/src/internal/operators/tap.ts b/tools/node_modules/eslint/node_modules/rxjs/src/internal/operators/tap.ts index e38dc2ec11..661d055eea 100644 --- a/tools/node_modules/eslint/node_modules/rxjs/src/internal/operators/tap.ts +++ b/tools/node_modules/eslint/node_modules/rxjs/src/internal/operators/tap.ts @@ -6,6 +6,12 @@ import { noop } from '../util/noop'; import { isFunction } from '../util/isFunction'; /* tslint:disable:max-line-length */ +/** @deprecated Use an observer instead of a complete callback */ +export function tap<T>(next: null | undefined, error: null | undefined, complete: () => void): MonoTypeOperatorFunction<T>; +/** @deprecated Use an observer instead of an error callback */ +export function tap<T>(next: null | undefined, error: (error: any) => void, complete?: () => void): MonoTypeOperatorFunction<T>; +/** @deprecated Use an observer instead of a complete callback */ +export function tap<T>(next: (value: T) => void, error: null | undefined, 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 */ @@ -36,6 +42,9 @@ export function tap<T>(observer: PartialObserver<T>): MonoTypeOperatorFunction<T * ## Example * Map every click to the clientX position of that click, while also logging the click event * ```javascript + * import { fromEvent } from 'rxjs'; + * import { tap, map } from 'rxjs/operators'; + * * const clicks = fromEvent(document, 'click'); * const positions = clicks.pipe( * tap(ev => console.log(ev)), |