export type ReshapeKey = string | number; export type ReshapeAccessor = (keyof T & string) | ((row: T) => unknown); export type ReshapeAggregate = 'sum' | 'count' | 'min' | 'max' | ((values: unknown[], rows: T[]) => unknown); export type PivotFill = string | number | boolean | null | ((value: string, index: ReshapeKey, column: ReshapeKey) => unknown); export interface PivotRowsOptions> { index: ReshapeAccessor; columns: ReshapeAccessor; values: readonly (keyof T & string)[]; aggregate?: ReshapeAggregate; fill?: PivotFill; indexValues?: readonly ReshapeKey[]; columnValues?: readonly ReshapeKey[]; normalizeKey?: (value: unknown) => ReshapeKey; missingKey?: 'empty' | 'skip' | 'error'; separator?: string; indexName?: string; columnName?: (valueField: string, column: ReshapeKey) => string; } export type PivotRow = Record; export declare function pivotRows>(rows: readonly T[], options: PivotRowsOptions): PivotRow[];