@reactivex/ix-esnext-esm
Version:
The Interactive Extensions for JavaScript
1 lines • 1.99 kB
Source Map (JSON)
{"version":3,"sources":["add/iterable-operators/groupby.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACrD,OAAO,EAAE,OAAO,EAAmB,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AACnG,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAiB/C;;GAEG;AACH,MAAM,UAAU,YAAY,CAE1B,WAAqC,EACrC,kBAA8C,QAAQ,EACtD,iBAAmE,qBAAqB;IAExF,OAAO,OAAO,CAAiC,WAAW,EAAE,eAAe,EAAE,cAAc,CAAC,CAC1F,IAAI,CACL,CAAC;AACJ,CAAC;AAED,SAAS,CAAC,SAAS,CAAC,OAAO,GAAG,YAAY,CAAC","file":"groupby.js","sourcesContent":["import { IterableX } from '../../iterable/iterablex';\nimport { groupBy, GroupedIterable, groupByResultIdentity } from '../../iterable/operators/groupby';\nimport { identity } from '../../util/identity';\n\nexport function groupByProto<TSource, TKey>(\n this: IterableX<TSource>,\n keySelector: (value: TSource) => TKey\n): IterableX<GroupedIterable<TKey, TSource>>;\nexport function groupByProto<TSource, TKey, TValue>(\n this: IterableX<TSource>,\n keySelector: (value: TSource) => TKey,\n elementSelector?: (value: TSource) => TValue\n): IterableX<GroupedIterable<TKey, TValue>>;\nexport function groupByProto<TSource, TKey, TValue, TResult>(\n this: IterableX<TSource>,\n keySelector: (value: TSource) => TKey | Promise<TKey>,\n elementSelector?: (value: TSource) => TValue | Promise<TValue>,\n resultSelector?: (key: TKey, values: Iterable<TValue>) => TResult\n): IterableX<TResult>;\n/**\n * @ignore\n */\nexport function groupByProto<TSource, TKey, TValue, TResult>(\n this: IterableX<TSource>,\n keySelector: (value: TSource) => TKey,\n elementSelector: (value: TSource) => TValue = identity,\n resultSelector: (key: TKey, values: Iterable<TValue>) => TResult = groupByResultIdentity\n): IterableX<TResult> {\n return groupBy<TSource, TKey, TValue, TResult>(keySelector, elementSelector, resultSelector)(\n this\n );\n}\n\nIterableX.prototype.groupBy = groupByProto;\n\ndeclare module '../../iterable/iterablex' {\n interface IterableX<T> {\n groupBy: typeof groupByProto;\n }\n}\n"]}