import { IterableX } from '../../iterable/iterablex' ; import { groupBy , GroupedIterable } from '../../iterable/operators/groupby' ; import { identity } from '../../util/identity' ; export function groupByProto < TSource , TKey > ( this , keySelector ) ; export function groupByProto < TSource , TKey , TValue > ( this , keySelector , elementSelector ? ) ; export function groupByProto < TSource , TKey , TValue > ( this , keySelector , elementSelector = identity ) { return groupBy < TSource , TKey , TValue > ( keySelector , elementSelector ) ( this ) ; } IterableX . prototype . groupBy = groupByProto ; declare module '../../iterable/iterablex' { interface IterableX < T > { groupBy : typeof groupByProto ; } }