ix
Version:
The Interactive Extensions for JavaScript
1 lines • 1.45 kB
Source Map (JSON)
{"version":3,"sources":["add/asynciterable-operators/tomap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AACpE,OAAO,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAWlD;;GAEG;AACH,MAAM,UAAU,UAAU,CAExB,WAAoD,EACpD,eAAiE;IAEjE,OAAO,KAAK,CAAC,IAAI,EAAE,WAAW,EAAE,eAAe,CAAC,CAAC;AACnD,CAAC;AAED,cAAc,CAAC,SAAS,CAAC,KAAK,GAAG,UAAU,CAAC","file":"tomap.js","sourcesContent":["import { AsyncIterableX } from '../../asynciterable/asynciterablex';\nimport { toMap } from '../../asynciterable/tomap';\n\nexport function toMapProto<TSource, TKey>(\n this: AsyncIterableX<TSource>,\n keySelector: (item: TSource) => TKey | Promise<TKey>\n): Promise<Map<TKey, TSource>>;\nexport function toMapProto<TSource, TKey, TElement = TSource>(\n this: AsyncIterableX<TSource>,\n keySelector: (item: TSource) => TKey | Promise<TKey>,\n elementSelector?: (item: TSource) => TElement | Promise<TElement>\n): Promise<Map<TKey, TElement>>;\n/**\n * @ignore\n */\nexport function toMapProto<TSource, TKey, TElement = TSource>(\n this: AsyncIterableX<TSource>,\n keySelector: (item: TSource) => TKey | Promise<TKey>,\n elementSelector?: (item: TSource) => TElement | Promise<TElement>\n): Promise<Map<TKey, TElement | TSource>> {\n return toMap(this, keySelector, elementSelector);\n}\n\nAsyncIterableX.prototype.toMap = toMapProto;\n\ndeclare module '../../asynciterable/asynciterablex' {\n interface AsyncIterableX<T> {\n toMap: typeof toMapProto;\n }\n}\n"]}