import type { Callback } from '../../types/Callback.js'; declare global { interface ReadonlyArray { /** * Calls a defined callback function on each element of an array, and * returns an array that contains all of the results that are not `null` * or `undefined`. * * @param callback - A function that accepts up to three arguments. The * compactMap method calls the callback function one time for each * element in the array. * * @returns A new array with the results */ compactMap(callback: Callback): Array; } interface Array { /** * Calls a defined callback function on each element of an array, and * returns an array that contains all of the results that are not `null` * or `undefined`. * * @param callback - A function that accepts up to three arguments. The * compactMap method calls the callback function one time for each * element in the array. * * @returns A new array with the results */ compactMap(callback: Callback): Array; } }