source: node_modules/es-toolkit/dist/compat/array/tail.d.ts

Last change on this file was a762898, checked in by istevanoska <ilinastevanoska@…>, 5 months ago

Added visualizations

  • Property mode set to 100644
File size: 638 bytes
Line 
1/**
2 * Gets all but the first element of array.
3 *
4 * @template T
5 * @param {readonly [unknown, ...T]} array - The array to query.
6 * @returns {T} Returns the slice of array.
7 *
8 * @example
9 * tail([1, 2, 3]);
10 * // => [2, 3]
11 */
12declare function tail<T extends unknown[]>(array: readonly [unknown, ...T]): T;
13/**
14 * Gets all but the first element of array.
15 *
16 * @template T
17 * @param {ArrayLike<T> | null | undefined} array - The array to query.
18 * @returns {T[]} Returns the slice of array.
19 *
20 * @example
21 * tail([1, 2, 3]);
22 * // => [2, 3]
23 */
24declare function tail<T>(array: ArrayLike<T> | null | undefined): T[];
25
26export { tail };
Note: See TracBrowser for help on using the repository browser.