reports/frontend/node_modules/es-toolkit/dist/compat/array/takeRight.d.ts
jtricerolph 1c411e402e Add settings page for managing forecasting API key and URL via UI
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-20 14:37:36 +00:00

28 lines
No EOL
611 B
TypeScript

//#region src/compat/array/takeRight.d.ts
/**
* Creates a slice of array with n elements taken from the end.
*
* @template T
* @param array - The array to query.
* @param [n=1] - The number of elements to take.
* @returns Returns the slice of array.
*
* @example
* takeRight([1, 2, 3]);
* // => [3]
*
* @example
* takeRight([1, 2, 3], 2);
* // => [2, 3]
*
* @example
* takeRight([1, 2, 3], 5);
* // => [1, 2, 3]
*
* @example
* takeRight([1, 2, 3], 0);
* // => []
*/
declare function takeRight<T>(array: ArrayLike<T> | null | undefined, n?: number): T[];
//#endregion
export { takeRight };