diff options
Diffstat (limited to 'tools/node_modules/eslint/node_modules/rxjs/internal/operators/takeWhile.d.ts')
-rw-r--r-- | tools/node_modules/eslint/node_modules/rxjs/internal/operators/takeWhile.d.ts | 42 |
1 files changed, 2 insertions, 40 deletions
diff --git a/tools/node_modules/eslint/node_modules/rxjs/internal/operators/takeWhile.d.ts b/tools/node_modules/eslint/node_modules/rxjs/internal/operators/takeWhile.d.ts index 9ff21b016d..2ac91be6d3 100644 --- a/tools/node_modules/eslint/node_modules/rxjs/internal/operators/takeWhile.d.ts +++ b/tools/node_modules/eslint/node_modules/rxjs/internal/operators/takeWhile.d.ts @@ -1,41 +1,3 @@ -import { MonoTypeOperatorFunction } from '../types'; -/** - * Emits values emitted by the source Observable so long as each value satisfies - * the given `predicate`, and then completes as soon as this `predicate` is not - * satisfied. - * - * <span class="informal">Takes values from the source only while they pass the - * condition given. When the first value does not satisfy, it completes.</span> - * - * ![](takeWhile.png) - * - * `takeWhile` subscribes and begins mirroring the source Observable. Each value - * emitted on the source is given to the `predicate` function which returns a - * boolean, representing a condition to be satisfied by the source values. The - * output Observable emits the source values until such time as the `predicate` - * returns false, at which point `takeWhile` stops mirroring the source - * Observable and completes the output Observable. - * - * ## Example - * Emit click events only while the clientX property is greater than 200 - * ```javascript - * const clicks = fromEvent(document, 'click'); - * const result = clicks.pipe(takeWhile(ev => ev.clientX > 200)); - * result.subscribe(x => console.log(x)); - * ``` - * - * @see {@link take} - * @see {@link takeLast} - * @see {@link takeUntil} - * @see {@link skip} - * - * @param {function(value: T, index: number): boolean} predicate A function that - * evaluates a value emitted by the source Observable and returns a boolean. - * Also takes the (zero-based) index as the second argument. - * @return {Observable<T>} An Observable that emits the values from the source - * Observable so long as each value satisfies the condition defined by the - * `predicate`, then completes. - * @method takeWhile - * @owner Observable - */ +import { OperatorFunction, MonoTypeOperatorFunction } from '../types'; +export declare function takeWhile<T, S extends T>(predicate: (value: T, index: number) => value is S): OperatorFunction<T, S>; export declare function takeWhile<T>(predicate: (value: T, index: number) => boolean): MonoTypeOperatorFunction<T>; |