From ab72019a17ccc077384c37eaeae15fffc9ce4d92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Wed, 1 Nov 2023 23:25:18 +0100 Subject: feat: enable Array.fromAsync (#21048) --- cli/tsc/dts/lib.esnext.array.d.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'cli/tsc') diff --git a/cli/tsc/dts/lib.esnext.array.d.ts b/cli/tsc/dts/lib.esnext.array.d.ts index a74a7b311..5bf6612fc 100644 --- a/cli/tsc/dts/lib.esnext.array.d.ts +++ b/cli/tsc/dts/lib.esnext.array.d.ts @@ -291,3 +291,17 @@ interface BigUint64Array { with(index: number, value: number): BigUint64Array; } + +// NOTE(bartlomieju): taken from https://github.com/microsoft/TypeScript/issues/50803#issuecomment-1249030430 +// while we wait for these types to officially ship +interface ArrayConstructor { + fromAsync( + iterableOrArrayLike: AsyncIterable | Iterable> | ArrayLike>, + ): Promise; + + fromAsync( + iterableOrArrayLike: AsyncIterable | Iterable | ArrayLike, + mapFn: (value: Awaited) => U, + thisArg?: any, + ): Promise[]>; +} -- cgit v1.2.3