Skip to content

Commit

Permalink
fix: error "A rest element type must be an array type.ts(2574)"
Browse files Browse the repository at this point in the history
  • Loading branch information
MajorLift committed Mar 24, 2024
1 parent 8843a71 commit 7507b0c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/list/reverse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ type _$reverse2<T extends unknown[], O extends unknown[] = []> = T extends [
? [...O, Last]
: _$reverse2<Init, [...O, Last]>
: T extends [infer Head, ...unknown[]]
? Head
? [Head]
: [...O, ...T]

/**
Expand Down

0 comments on commit 7507b0c

Please sign in to comment.