UNPKG

908 BTypeScriptView Raw
1import { IterableX } from '../../iterable/iterablex';
2import { GroupedIterable } from '../../iterable/groupby';
3export declare function groupByProto<TSource, TKey>(this: IterableX<TSource>, keySelector: (value: TSource) => TKey): IterableX<GroupedIterable<TKey, TSource>>;
4export declare function groupByProto<TSource, TKey, TValue>(this: IterableX<TSource>, keySelector: (value: TSource) => TKey, elementSelector?: (value: TSource) => TValue): IterableX<GroupedIterable<TKey, TValue>>;
5export declare function groupByProto<TSource, TKey, TValue, TResult>(this: IterableX<TSource>, keySelector: (value: TSource) => TKey | Promise<TKey>, elementSelector?: (value: TSource) => TValue | Promise<TValue>, resultSelector?: (key: TKey, values: Iterable<TValue>) => TResult): IterableX<TResult>;
6declare module '../../iterable/iterablex' {
7 interface IterableX<T> {
8 groupBy: typeof groupByProto;
9 }
10}