UNPKG

iter-tools-es

Version:
6 lines 718 B
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 };