1 | import { AsyncIterableX } from '../asynciterable';
|
2 | /**
|
3 | * Filters a sequence of values based on a predicate.
|
4 | * @param {Iterable<T | Promise<T>> | AsyncIterable<T>} source Source sequence.
|
5 | * @param {function(value: T, index: number): boolean | Promise<boolean>} predicate A function to test each source element for a condition.
|
6 | * @param {Object} [thisArg] Value to use as this when executing callback.
|
7 | * @return {AsyncIterable<T>} Sequence that contains elements from the input sequence that satisfy the condition.
|
8 | */
|
9 | export declare function filterAsync<T, S extends T>(source: Iterable<T | PromiseLike<T>> | AsyncIterable<T>, predicate: (value: T, index: number) => value is S, thisArg?: any): AsyncIterableX<S>;
|
10 | export declare function filterAsync<T>(source: Iterable<T | PromiseLike<T>> | AsyncIterable<T>, predicate: (value: T, index: number) => boolean | Promise<boolean>, thisArg?: any): AsyncIterableX<T>;
|