Skip to content

Commit 7e59b1b

Browse files
committed
chore: fix typo and indentation
1 parent af7ed2a commit 7e59b1b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

source/array-reverse.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ type _ArrayReverse<
6565
Result extends UnknownArray = never,
6666
> =
6767
keyof TArray & `${number}` extends never
68-
// Enters this branch, if `Array_` is empty (e.g., `[]`),
69-
// or `Array_` contains no non-rest elements preceding the rest element (e.g., `[...string[]]` or `[...string[], string]`).
68+
// Enters this branch, if `TArray` is empty (e.g., `[]`),
69+
// or `TArray` contains no non-rest elements preceding the rest element (e.g., `[...string[]]` or `[...string[], string]`).
7070
? TArray extends readonly [...infer Rest, infer Last]
7171
? _ArrayReverse<Rest, BeforeRestAcc, [...AfterRestAcc, Last], Result> // Accumulate elements that are present after the rest element in reverse order.
7272
: Result | [...AfterRestAcc, ...TArray, ...BeforeRestAcc] // Add the rest element between the accumulated elements.
@@ -76,7 +76,7 @@ type _ArrayReverse<
7676
Rest,
7777
[First | (If<IsExactOptionalPropertyTypesEnabled, never, undefined>), ...BeforeRestAcc], // Add `| undefined` for optional elements, if `exactOptionalPropertyTypes` is disabled.
7878
AfterRestAcc,
79-
Result | BeforeRestAcc
79+
Result | BeforeRestAcc
8080
>,
8181
_ArrayReverse<Rest, [First, ...BeforeRestAcc], AfterRestAcc, Result>>
8282
: never; // Should never happen, since `readonly [(infer First)?, ...infer Rest]` is a top-type for arrays.

0 commit comments

Comments
 (0)