Skip to content

Commit

Permalink
update a comment
Browse files Browse the repository at this point in the history
  • Loading branch information
Harris-Miller committed Apr 2, 2024
1 parent b6b42f5 commit dd30f77
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion types/tail.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// string
export function tail(list: string): string;
// non-empty tuples and array
// `infer Tail` only works on types like `readonly [1, '2', 3]` where you will get back `['2', 3]`
// else, if the type is `string[]`, you'll get back `string[]`
export function tail<T extends readonly [...any]>(list: T): T extends readonly [any, ...infer Tail] ? Tail : T;

0 comments on commit dd30f77

Please sign in to comment.