UNPKG

@newdash/newdash

Version:

javascript/typescript utility library

16 lines (15 loc) 673 B
import type { ArrayIteratee, RecordIteratee, Tuple } from "../types"; /** * * AsyncUtils.map, mapping values with async iteratee functions * * @author Theo Sun * @since 5.18.0 * @category Async * @param collection */ export declare function map<T extends any[] | []>(collection: T): Promise<Tuple<T>>; export declare function map<T, R = any>(collection: ArrayLike<T>, iteratee?: ArrayIteratee<T, Promise<R>>): Promise<Array<R>>; export declare function map<T, R = any>(collection: Record<string, T>, iteratee?: RecordIteratee<T, Promise<R>>): Promise<Array<R>>; export declare function map(collection: any, iteratee?: any): Promise<Array<any>>; export default map;