The type of elements in the input array
The type of elements in the result array
The type of the error value (defaults to undefined)
The input array to map over
The async function to apply to each element
Optionaloptions: { concurrency?: number; continueOnError?: boolean; errorValue?: E } = {}Optional configuration
Optionalconcurrency?: numberMaximum number of concurrent operations
OptionalcontinueOnError?: booleanWhether to continue execution when a callback throws
OptionalerrorValue?: EValue to use when an error occurs and continueOnError is true
Promise resolving to an array of results or error values
// Basic usage
const numbers = [1, 2, 3, 4];
const doubled = await asyncMap(numbers, async (n) => n * 2);
// Result: [2, 4, 6, 8]
Maps over an array with an asynchronous callback function and returns a promise that resolves to an array of results.