Skip to content

Commit

Permalink
fix(tail): Fix type definition for tail
Browse files Browse the repository at this point in the history
  • Loading branch information
raon0211 committed Jul 19, 2024
1 parent 0bb2a1a commit 78c0c66
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/array/tail.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ export function tail<T, U>(arr: readonly [T, ...U[]]): U[];
* const result3 = tail(arr3);
* // result3 will be []
*/
export function tail<T>(arr: readonly T[]): T[];

export function tail<T>(arr: readonly T[]): T[] {
const len = arr.length;
if (len <= 1) {
Expand Down

0 comments on commit 78c0c66

Please sign in to comment.