import { DeepMap } from './deepMap'; export type GroupKeyType = T; export type GroupBy = { field: keyof DataType & string; toKey?: (value: any, data: DataType) => GroupKeyType; }; export type AggregateParams = { reducers: Record>; groupBy?: GroupBy[]; defaultToKey?: (value: any, item: DataType) => GroupKeyType; }; export type DataAggregationReducer = { name?: string; field?: keyof T & string; initialValue?: AggregationResultType; getter?: (data: T) => any; reducer: string | ((accumulator: any, value: any, data: T, dataIndex: number) => AggregationResultType | any); done?: (accumulatedValue: AggregationResultType | any, array: T[]) => AggregationResultType; }; export type DataAggregationResult = { deepMap: DeepMap, DeepMapAggregationValueType>; aggregateParams: AggregateParams; initialData: DataType[]; reducerResults?: Record; }; export type DeepMapAggregationValueType = { items: DataType[]; commonData?: Partial; reducerResults: Record; }; export type AggregationReducerResult = number; export declare function aggregate(aggregateParams: AggregateParams, data: DataType[]): DataAggregationResult;