src/vs/base/common/async.ts/AsyncIterableObject/toPromise
class AsyncIterableObject:	public static async toPromise<T>(iterable: AsyncIterable<T>): Promise<T[]> {
		const result: T[] = [];
		for await (const item of iterable) {
			result.push(item);
		}
		return result;
	}