UNPKG

iter-tools

Version:
6 lines 780 B
import { AsyncWrappable } from '../../types/async-iterable'; declare function asyncFindBestOr<N, T>(notFoundValue: N, comparer: (best: T, value: T) => boolean): (iterable: AsyncWrappable<T>) => Promise<T | N>; declare function asyncFindBestOr<N, T>(notFoundValue: N, comparer: (best: T, value: T) => boolean, iterable: AsyncWrappable<T>): Promise<T | N>; declare function asyncFindBestOr<N, T, S>(notFoundValue: N, comparer: (best: S, value: S) => boolean, mapper: (value: T, i: number) => S | Promise<S>): (iterable: AsyncWrappable<T>) => Promise<T | N>; declare function asyncFindBestOr<N, T, S>(notFoundValue: N, comparer: (best: S, value: S) => boolean, mapper: (value: T, i: number) => S | Promise<S>, iterable: AsyncWrappable<T>): Promise<T | N>; export { asyncFindBestOr };