@reactivex/ix-esnext-esm
Version:
The Interactive Extensions for JavaScript
1 lines • 1.38 kB
Source Map (JSON)
{"version":3,"sources":["add/asynciterable-operators/reduce.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AACpE,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAYpD;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,WAAW,CAE/B,WAAwF,EACxF,GAAG,IAAS;IAEZ,OAAO,MAAM,CAAC,IAAI,EAAE,WAAW,EAAE,GAAG,IAAI,CAAC,CAAC;AAC5C,CAAC;AAED,cAAc,CAAC,SAAS,CAAC,MAAM,GAAG,WAAW,CAAC","file":"reduce.js","sourcesContent":["import { AsyncIterableX } from '../../asynciterable/asynciterablex';\nimport { reduce } from '../../asynciterable/reduce';\n\nexport async function reduceProto<T, R = T>(\n this: AsyncIterableX<T>,\n accumulator: (previousValue: R, currentValue: T, currentIndex: number) => R | Promise<R>,\n seed?: never[]\n): Promise<R>;\nexport async function reduceProto<T, R = T>(\n this: AsyncIterableX<T>,\n accumulator: (previousValue: R, currentValue: T, currentIndex: number) => R | Promise<R>,\n seed?: R\n): Promise<R>;\n/**\n * @ignore\n */\nexport async function reduceProto<T, R = T>(\n this: AsyncIterableX<T>,\n accumulator: (previousValue: R, currentValue: T, currentIndex: number) => R | Promise<R>,\n ...seed: R[]\n): Promise<R> {\n return reduce(this, accumulator, ...seed);\n}\n\nAsyncIterableX.prototype.reduce = reduceProto;\n\ndeclare module '../../asynciterable/asynciterablex' {\n interface AsyncIterableX<T> {\n reduce: typeof reduceProto;\n }\n}\n"]}