Array.fromAsync recently reached stage 3 (conditional on editor review). That means we should look into implementing it in TS under esnext.
The signature should probably be
interface ArrayConstructor {
fromAsync<T>(iterator: AsyncIteratable<T>): Promise<T[]>;
fromAsync<T, U>(iterator: AsyncIteratable<T>, mapFn: (value: T) => U, thisArg?: any): Promise<Awaited<T>[]>;
}
Array.fromAsyncrecently reached stage 3 (conditional on editor review). That means we should look into implementing it in TS underesnext.The signature should probably be