import { GenericConstructor } from "../interfaces"; /* dojo/_base/array */ /** * Determines whether or not every item in arr satisfies the condition implemented by callback. * @param {T[] | string} arr the array to iterate on. If a string, operates on individual characters. * @param {Function | string} callback a function is invoked with three arguments: item, index, and * array and returns true if the condition is met. * @param {object} thisObj may be used to scope the call to callback */ export function every(arr: T[] | string, callback: string | ((item: T, idx: number, arr: T[]) => boolean), thisObj?: Object): boolean; /** * Determines whether or not any item in arr satisfies the condition implemented by callback. */ export function some(arr: T[] | string, callback: string | ((item: T, idx: number, arr: T[]) => boolean), thisObj?: Object): boolean; /** * locates the last index of the provided value in the passed array. If the value is not found, -1 * is returned. * @param {boolean} findLast Makes indexOf() work like lastIndexOf(). Used internally; not meant * for external usage. */ export function indexOf(arr: T[], value: T, fromIndex?: number, findLast?: boolean): number; /** * locates the first index of the provided value in the passed array. If the value is not found, * -1 is returned. */ export function lastIndexOf(arr: T[], value: T, fromIndex?: number): number; /** * locates the last index of the provided value in the passed array. If the value is not found, * -1 is returned. */ export function forEach(arr: T[], callback: string | ((item: T, idx: number, arr: T[]) => void), thisObj?: Object): void; /** * for every item in arr, callback is invoked. Return values are ignored. If you want to break * out of the loop, consider using array.every() or array.some(). */ export function map(arr: T[] | string, callback: string | ((item: T, idx: number, arr: T[]) => U), thisObj?: Object, Ctr?: GenericConstructor): U[]; /** * Returns a new Array with those items from arr that match the condition implemented by * callback. */ export function filter(arr: T[], callback: string | ((item: T, idx: number, arr: T[]) => boolean), thisObj?: Object): T[]; export function clearCache(): void;