UNPKG

@reactivex/ix-esnext-esm

Version:

The Interactive Extensions for JavaScript

1 lines 5.97 kB
{"version":3,"sources":["asynciterable/operators/zipwith.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,QAAQ,CAAC;AAsG1C,MAAM,UAAU,OAAO,CAAI,GAAG,OAAc;IAC1C,OAAO,SAAS,uBAAuB,CAAC,MAAwB;QAC9D,OAAO,IAAI,gBAAgB,CAAI,CAAC,MAAM,EAAE,GAAG,OAAO,CAAC,CAAC,CAAC;IACvD,CAAC,CAAC;AACJ,CAAC","file":"zipwith.js","sourcesContent":["import { OperatorAsyncFunction } from '../../interfaces';\nimport { ZipAsyncIterable } from '../zip';\n\n/**\n * Merges multiple async-iterable sequences into one async-iterable sequence by combining their elements in a pairwise fashion.\n *\n * @export\n * @template T The type of the first async-iterable sequence.\n * @template T2 The type of the second async-iterable sequence.\n * @param {AsyncIterable<T2>} source2 The second async-iterable source.\n * @returns {OperatorAsyncFunction<T, [T, T2]>} Async iterable with an array of each element from the source sequences in a pairwise fashion.\n */\nexport function zipWith<T, T2>(source2: AsyncIterable<T2>): OperatorAsyncFunction<T, [T, T2]>;\n/**\n * Merges multiple async-iterable sequences into one async-iterable sequence by combining their elements in a pairwise fashion.\n *\n * @export\n * @template T The type of the first async-iterable sequence.\n * @template T2 The type of the second async-iterable sequence.\n * @template T3 The type of the third async-iterable sequence.\n * @param {AsyncIterable<T2>} source2 The second async-iterable source.\n * @param {AsyncIterable<T3>} source3 The third async-iterable source.\n * @returns {OperatorAsyncFunction<T, [T, T2, T3]>} Async iterable with an array of each element from the source sequences in a pairwise fashion.\n */\nexport function zipWith<T, T2, T3>(\n source2: AsyncIterable<T2>,\n source3: AsyncIterable<T3>\n): OperatorAsyncFunction<T, [T, T2, T3]>;\n/**\n * Merges multiple async-iterable sequences into one async-iterable sequence by combining their elements in a pairwise fashion.\n *\n * @export\n * @template T The type of the first async-iterable sequence.\n * @template T2 The type of the second async-iterable sequence.\n * @template T3 The type of the third async-iterable sequence.\n * @template T4 The type of the fourth async-iterable sequence.\n * @param {AsyncIterable<T2>} source2 The second async-iterable source.\n * @param {AsyncIterable<T3>} source3 The third async-iterable source.\n * @param {AsyncIterable<T4>} source4 The fourth async-iterable source.\n * @returns {OperatorAsyncFunction<T, [T, T2, T3, T4]>} Async iterable with an array of each element from the source sequences in a pairwise fashion.\n */\nexport function zipWith<T, T2, T3, T4>(\n source2: AsyncIterable<T2>,\n source3: AsyncIterable<T3>,\n source4: AsyncIterable<T4>\n): OperatorAsyncFunction<T, [T, T2, T3, T4]>;\n/**\n * Merges multiple async-iterable sequences into one async-iterable sequence by combining their elements in a pairwise fashion.\n *\n * @export\n * @template T The type of the first async-iterable sequence.\n * @template T2 The type of the second async-iterable sequence.\n * @template T3 The type of the third async-iterable sequence.\n * @template T4 The type of the fourth async-iterable sequence.\n * @template T5 The type of the fifth async-iterable sequence.\n * @param {AsyncIterable<T2>} source2 The second async-iterable source.\n * @param {AsyncIterable<T3>} source3 The third async-iterable source.\n * @param {AsyncIterable<T4>} source4 The fourth async-iterable source.\n * @param {AsyncIterable<T5>} source5 The fifth async-iterable source.\n * @returns {OperatorAsyncFunction<T, [T, T2, T3, T4, T5]>} Async iterable with an array of each element from the source\n * sequences in a pairwise fashion.\n */\nexport function zipWith<T, T2, T3, T4, T5>(\n source2: AsyncIterable<T2>,\n source3: AsyncIterable<T3>,\n source4: AsyncIterable<T4>,\n source5: AsyncIterable<T5>\n): OperatorAsyncFunction<T, [T, T2, T3, T4, T5]>;\n/**\n * Merges multiple async-iterable sequences into one async-iterable sequence by combining their elements in a pairwise fashion.\n *\n * @export\n * @template T The type of the first async-iterable sequence.\n * @template T2 The type of the second async-iterable sequence.\n * @template T3 The type of the third async-iterable sequence.\n * @template T4 The type of the fourth async-iterable sequence.\n * @template T5 The type of the fifth async-iterable sequence.\n * @template T6 The type of the sixth async-iterable sequence.\n * @param {AsyncIterable<T2>} source2 The second async-iterable source.\n * @param {AsyncIterable<T3>} source3 The third async-iterable source.\n * @param {AsyncIterable<T4>} source4 The fourth async-iterable source.\n * @param {AsyncIterable<T5>} source5 The fifth async-iterable source.\n * @param {AsyncIterable<T6>} source6 The sixth async-iterable source.\n * @returns {OperatorAsyncFunction<T, [T, T2, T3, T4, T5, T6]>} Async iterable with an array of each element from the source\n * sequences in a pairwise fashion.\n */\nexport function zipWith<T, T2, T3, T4, T5, T6>(\n source2: AsyncIterable<T2>,\n source3: AsyncIterable<T3>,\n source4: AsyncIterable<T4>,\n source5: AsyncIterable<T5>,\n source6: AsyncIterable<T6>\n): OperatorAsyncFunction<T, [T, T2, T3, T4, T5, T6]>;\n\n/**\n * Merges multiple async-iterable sequences into one async-iterable sequence by combining their elements in a pairwise fashion.\n *\n * @export\n * @template T The type of elements in the source sequences.\n * @param {...AsyncIterable<T>[]} sources The source sequences.\n * @returns {AsyncIterableX<T[]>} Async iterable with an array of each element from the source sequences in a pairwise fashion.\n */\nexport function zipWith<T>(...sources: AsyncIterable<T>[]): OperatorAsyncFunction<T, T[]>;\nexport function zipWith<T>(...sources: any[]): OperatorAsyncFunction<T, T[]> {\n return function zipWithOperatorFunction(source: AsyncIterable<T>) {\n return new ZipAsyncIterable<T>([source, ...sources]);\n };\n}\n"]}