Add missing index parameter to the Array.fromAsync's mapFn (#59837)

This commit is contained in:
Mateusz Burzyński authored and GitHub committed 2024-09-03 10:18:18 -07:00
1 parent a709f9899c
commit fe2cb8ebaa
5 files changed
+103 -53

No files matched your search

+1 -1
View File
@@ -13,5 +13,5 @@ interface ArrayConstructor {
* Each return value is awaited before being added to result array.
* @param thisArg Value of 'this' used when executing mapfn.
*/
fromAsync<T, U>(iterableOrArrayLike: AsyncIterable<T> | Iterable<T> | ArrayLike<T>, mapFn: (value: Awaited<T>) => U, thisArg?: any): Promise<Awaited<U>[]>;
fromAsync<T, U>(iterableOrArrayLike: AsyncIterable<T> | Iterable<T> | ArrayLike<T>, mapFn: (value: Awaited<T>, index: number) => U, thisArg?: any): Promise<Awaited<U>[]>;
}