diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2024-07-03 15:09:54 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-03 16:09:54 +0200 |
commit | 3242e2718fdbbdb6d1855c0f694e816f9af3f09c (patch) | |
tree | ee058f886a717a1571d247ef94d95ace14ef4055 /cli/tsc/dts/lib.esnext.array.d.ts | |
parent | 496ea5903bbe8e86185c30fc6f478b0092d64d65 (diff) |
feat: Upgrade to TypeScript 5.5.2 (#24326)
This commit upgrades TypeScript to 5.5.2.
https://devblogs.microsoft.com/typescript/announcing-typescript-5-5/
Diffstat (limited to 'cli/tsc/dts/lib.esnext.array.d.ts')
-rw-r--r-- | cli/tsc/dts/lib.esnext.array.d.ts | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/cli/tsc/dts/lib.esnext.array.d.ts b/cli/tsc/dts/lib.esnext.array.d.ts index bcf6fb62c..39efbba0d 100644 --- a/cli/tsc/dts/lib.esnext.array.d.ts +++ b/cli/tsc/dts/lib.esnext.array.d.ts @@ -13,18 +13,23 @@ See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */ + /// <reference no-default-lib="true"/> -// 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>[]>; + /** + * Creates an array from an async iterator or iterable object. + * @param iterableOrArrayLike An async iterator or array-like object to convert to an array. + */ + fromAsync<T>(iterableOrArrayLike: AsyncIterable<T> | Iterable<T | PromiseLike<T>> | ArrayLike<T | PromiseLike<T>>): Promise<T[]>; + + /** + * Creates an array from an async iterator or iterable object. + * + * @param iterableOrArrayLike An async iterator or array-like object to convert to an array. + * @param mapfn A mapping function to call on every element of itarableOrArrayLike. + * 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>[]>; } |