source: node_modules/es-toolkit/dist/compat/array/reverse.d.mts@ ba17441

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

Added visualizations

  • Property mode set to 100644
File size: 576 bytes
Line 
1import { MutableList } from '../_internal/MutableList.d.mjs';
2import { RejectReadonly } from '../_internal/RejectReadonly.d.mjs';
3
4/**
5 * Reverses `array` so that the first element becomes the last, the second element becomes the second to last, and so on.
6 *
7 * @template L
8 * @param {L extends readonly any[] ? never : L} array - The array to reverse.
9 * @returns {L} Returns `array`.
10 *
11 * @example
12 * const array = [1, 2, 3];
13 * reverse(array);
14 * // => [3, 2, 1]
15 */
16declare function reverse<L extends MutableList<any>>(array: RejectReadonly<L>): L;
17
18export { reverse };
Note: See TracBrowser for help on using the repository browser.