reports/frontend/node_modules/es-toolkit/dist/array/at.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

19 lines
No EOL
651 B
TypeScript

//#region src/array/at.d.ts
/**
* Retrieves elements from an array at the specified indices.
*
* This function supports negative indices, which count from the end of the array.
*
* @template T
* @param arr - The array to retrieve elements from.
* @param indices - An array of indices specifying the positions of elements to retrieve.
* @returns A new array containing the elements at the specified indices.
*
* @example
* const numbers = [10, 20, 30, 40, 50];
* const result = at(numbers, [1, 3, 4]);
* console.log(result); // [20, 40, 50]
*/
declare function at<T>(arr: readonly T[], indices: number[]): T[];
//#endregion
export { at };