Skip to content

Commit

Permalink
fix(types): let map callback return a PromiseLike object (#330)
Browse files Browse the repository at this point in the history
  • Loading branch information
aleclarson authored Jan 11, 2025
1 parent 48a38f7 commit 1c679b3
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 1c679b3

Please sign in to comment.