diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2023-11-01 23:25:18 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-01 22:25:18 +0000 |
commit | ab72019a17ccc077384c37eaeae15fffc9ce4d92 (patch) | |
tree | 9817bf313e25bdd8d318fb58b3e366f14d252858 /cli/tsc/dts | |
parent | 24c3c9695865bb478f5651da4982b7e0a34afc72 (diff) |
feat: enable Array.fromAsync (#21048)
Diffstat (limited to 'cli/tsc/dts')
-rw-r--r-- | cli/tsc/dts/lib.esnext.array.d.ts | 14 |
1 files changed, 14 insertions, 0 deletions
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<T>( + iterableOrArrayLike: AsyncIterable<T> | Iterable<T | Promise<T>> | ArrayLike<T | Promise<T>>, + ): Promise<T[]>; + + fromAsync<T, U>( + iterableOrArrayLike: AsyncIterable<T> | Iterable<T> | ArrayLike<T>, + mapFn: (value: Awaited<T>) => U, + thisArg?: any, + ): Promise<Awaited<U>[]>; +} |