import { AggregateDescriptor } from './aggregate.operators'; import { AggregateResult } from '../transducers'; // tslint:disable:max-line-length /** * The group descriptor used by the `groupBy` method. */ export interface GroupDescriptor { /** * The data item field by which the data will be grouped. */ field: string; /** * The sort order of the group. */ dir?: 'asc' | 'desc'; /** * The aggregates which are calculated during grouping. */ aggregates?: Array; } /** * The result of the group operation. */ export interface GroupResult { /** * Contains either the subgroups, or the data items. */ items: T[] | GroupResult[]; /** * The aggregated values for the group. An [`AggregateResult`]({% slug api_kendo-data-query_aggregateresult %}) instance. */ aggregates: AggregateResult; /** * The field by which the data items are grouped. */ field: string; /** * The group key. */ value: any; } // tslint:enable:max-line-length