declare global { export interface Array { /** * #### Async Map * * Maps an array asynchronously * * * * * * Example: * ```typescript * import "@thalesrc/js-utils/array/proto/async-map"; * * const array = [1, 2, 3]; * * const mapped = await array.asyncMap(async value => await addOneAfterASecond(value)); // [2, 3, 4] * * ``` * * * * * @param mapper Callback async function to map the array * @return A promise contains asynchronusly mapped array result */ asyncMap(callbackFn: (value: T, index: number, array: T[]) => Promise): Promise; } } export {};