import { Callback } from '../../types/Callback.js'; declare global { interface ReadonlyArray { /** * Calls a defined callback function on each element of an array until * one returns `true` or there are no more elements. * * @param callback - A function that accepts up to three arguments. The * last method calls the callback function up to one time for each * element in the array. * * @returns The last element where the callback returned true, or if none * do then `undefined` */ last(callback?: Callback): T | undefined; } interface Array { /** * Calls a defined callback function on each element of an array until * one returns `true` or there are no more elements. * * @param callback - A function that accepts up to three arguments. The * last method calls the callback function up to one time for each * element in the array. * * @returns The last element where the callback returned true, or if none * do then `undefined` */ last(callback?: Callback): T | undefined; } }