|
Last change
on this file was a762898, checked in by istevanoska <ilinastevanoska@…>, 5 months ago |
|
Added visualizations
|
-
Property mode
set to
100644
|
|
File size:
576 bytes
|
| Line | |
|---|
| 1 | import { MutableList } from '../_internal/MutableList.d.mjs';
|
|---|
| 2 | import { 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 | */
|
|---|
| 16 | declare function reverse<L extends MutableList<any>>(array: RejectReadonly<L>): L;
|
|---|
| 17 |
|
|---|
| 18 | export { reverse };
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.