diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2023-12-06 18:49:34 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-06 18:49:34 -0500 |
commit | 68d356eed91731cd0c13eb946f296aa90ef4d5ac (patch) | |
tree | d08389fa2e4a2d6a0c65f312fff17142f80b956d /cli/tsc/dts/lib.es2019.array.d.ts | |
parent | a931a47511f0f1160f2446a543fed867ea59703b (diff) |
feat: TypeScript 5.3 (#21480)
https://github.com/denoland/TypeScript/pull/9
Diffstat (limited to 'cli/tsc/dts/lib.es2019.array.d.ts')
-rw-r--r-- | cli/tsc/dts/lib.es2019.array.d.ts | 32 |
1 files changed, 14 insertions, 18 deletions
diff --git a/cli/tsc/dts/lib.es2019.array.d.ts b/cli/tsc/dts/lib.es2019.array.d.ts index a293248d8..36e956203 100644 --- a/cli/tsc/dts/lib.es2019.array.d.ts +++ b/cli/tsc/dts/lib.es2019.array.d.ts @@ -17,14 +17,12 @@ and limitations under the License. /// <reference no-default-lib="true"/> type FlatArray<Arr, Depth extends number> = { - "done": Arr, - "recur": Arr extends ReadonlyArray<infer InnerArr> - ? FlatArray<InnerArr, [-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][Depth]> - : Arr + done: Arr; + recur: Arr extends ReadonlyArray<infer InnerArr> ? FlatArray<InnerArr, [-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][Depth]> + : Arr; }[Depth extends -1 ? "done" : "recur"]; interface ReadonlyArray<T> { - /** * Calls a defined callback function on each element of an array. Then, flattens the result into * a new array. @@ -35,11 +33,10 @@ interface ReadonlyArray<T> { * @param thisArg An object to which the this keyword can refer in the callback function. If * thisArg is omitted, undefined is used as the this value. */ - flatMap<U, This = undefined> ( + flatMap<U, This = undefined>( callback: (this: This, value: T, index: number, array: T[]) => U | ReadonlyArray<U>, - thisArg?: This - ): U[] - + thisArg?: This, + ): U[]; /** * Returns a new array with all sub-array elements concatenated into it recursively up to the @@ -49,12 +46,11 @@ interface ReadonlyArray<T> { */ flat<A, D extends number = 1>( this: A, - depth?: D - ): FlatArray<A, D>[] - } + depth?: D, + ): FlatArray<A, D>[]; +} interface Array<T> { - /** * Calls a defined callback function on each element of an array. Then, flattens the result into * a new array. @@ -65,10 +61,10 @@ interface Array<T> { * @param thisArg An object to which the this keyword can refer in the callback function. If * thisArg is omitted, undefined is used as the this value. */ - flatMap<U, This = undefined> ( + flatMap<U, This = undefined>( callback: (this: This, value: T, index: number, array: T[]) => U | ReadonlyArray<U>, - thisArg?: This - ): U[] + thisArg?: This, + ): U[]; /** * Returns a new array with all sub-array elements concatenated into it recursively up to the @@ -78,6 +74,6 @@ interface Array<T> { */ flat<A, D extends number = 1>( this: A, - depth?: D - ): FlatArray<A, D>[] + depth?: D, + ): FlatArray<A, D>[]; } |