/** * Creates an array of elements split into groups the length of size. * If array can't be split evenly, the final chunk will be the remaining elements. * * @param array - The array to process * @param size - The length of each chunk * @returns Returns the new array of chunks * * @example * chunk(['a', 'b', 'c', 'd'], 2); * // => [['a', 'b'], ['c', 'd']] * * chunk(['a', 'b', 'c', 'd'], 3); * // => [['a', 'b', 'c'], ['d']] */ export declare function chunk(array: readonly T[], size?: number): T[][];