iter-tools-es
Version:
The iterable toolbox
6 lines • 718 B
TypeScript
import { AsyncWrappable } from '../../types/async-iterable';
declare function asyncFindBest<T>(comparer: (best: T, value: T) => boolean): (iterable: AsyncWrappable<T>) => Promise<T | undefined>;
declare function asyncFindBest<T>(comparer: (best: T, value: T) => boolean, iterable: AsyncWrappable<T>): Promise<T | undefined>;
declare function asyncFindBest<T, S>(comparer: (best: S, value: S) => boolean, mapper: (value: T, i: number) => S | Promise<S>): (iterable: AsyncWrappable<T>) => Promise<T | undefined>;
declare function asyncFindBest<T, S>(comparer: (best: S, value: S) => boolean, mapper: (value: T, i: number) => S | Promise<S>, iterable: AsyncWrappable<T>): Promise<T | undefined>;
export { asyncFindBest };