UNPKG

623 BTypeScriptView Raw
1/**
2 * Returns the index of the last element in the array where predicate is true, and -1
3 * otherwise.
4 * @param array The source array to search in
5 * @param predicate find calls predicate once for each element of the array, in descending
6 * order, until it finds one where predicate returns true. If such an element is found,
7 * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1.
8 */
9export declare function findLastIndex<T>(array: T[], predicate: (value: T, index: number, obj: T[]) => boolean): number;
10export declare function chunkByNumber<T>(array: T[], size: number): T[][];