reports/frontend/node_modules/es-toolkit/dist/compat/array/lastIndexOf.d.mts
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

23 lines
No EOL
694 B
TypeScript

//#region src/compat/array/lastIndexOf.d.ts
/**
* Gets the index at which the last occurrence of value is found in array.
*
* @template T
* @param array - The array to inspect.
* @param value - The value to search for.
* @param [fromIndex] - The index to search from or true to search from the end.
* @returns Returns the index of the matched value, else -1.
*
* @example
* lastIndexOf([1, 2, 1, 2], 2);
* // => 3
*
* lastIndexOf([1, 2, 1, 2], 2, 2);
* // => 1
*
* lastIndexOf([1, 2, 1, 2], 2, true);
* // => 1
*/
declare function lastIndexOf<T>(array: ArrayLike<T> | null | undefined, searchElement: T, fromIndex?: true | number): number;
//#endregion
export { lastIndexOf };