Skip to content

Commit

Permalink
fix(types): let map callback return a PromiseLike object
Browse files Browse the repository at this point in the history
  • Loading branch information
aleclarson committed Dec 23, 2024
1 parent 8048797 commit f899de5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/async/map.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/
export async function map<T, K>(
array: readonly T[],
asyncMapFunc: (item: T, index: number) => Promise<K>,
asyncMapFunc: (item: T, index: number) => PromiseLike<K>,
): Promise<K[]> {
if (!array) {
return []
Expand Down

0 comments on commit f899de5

Please sign in to comment.