utils.d.ts 623 B

12345678910
  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. */
  9. export declare function findLastIndex<T>(array: T[], predicate: (value: T, index: number, obj: T[]) => boolean): number;
  10. export declare function chunkByNumber<T>(array: T[], size: number): T[][];