UNPKG

iter-tools

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