UNPKG

@reactivex/ix-esnext-esm

Version:

The Interactive Extensions for JavaScript

1 lines 5.65 kB
{"version":3,"sources":["iterable/operators/zipwith.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAsGrC,MAAM,UAAU,OAAO,CAAI,GAAG,OAAc;IAC1C,OAAO,SAAS,uBAAuB,CAAC,MAAmB;QACzD,OAAO,IAAI,WAAW,CAAI,CAAC,MAAM,EAAE,GAAG,OAAO,CAAC,CAAC,CAAC;IAClD,CAAC,CAAC;AACJ,CAAC","file":"zipwith.js","sourcesContent":["import { OperatorFunction } from '../../interfaces';\nimport { ZipIterable } from '../zip';\n\n/**\n * Merges multiple iterable sequences into one 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 {Iterable<T2>} source2 The second async-iterable source.\n * @returns {OperatorFunction<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: Iterable<T2>): OperatorFunction<T, [T, T2]>;\n/**\n * Merges multiple iterable sequences into one 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 {Iterable<T2>} source2 The second async-iterable source.\n * @param {Iterable<T3>} source3 The third async-iterable source.\n * @returns {OperatorFunction<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: Iterable<T2>,\n source3: Iterable<T3>\n): OperatorFunction<T, [T, T2, T3]>;\n/**\n * Merges multiple iterable sequences into one 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 {Iterable<T2>} source2 The second async-iterable source.\n * @param {Iterable<T3>} source3 The third async-iterable source.\n * @param {Iterable<T4>} source4 The fourth async-iterable source.\n * @returns {OperatorFunction<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: Iterable<T2>,\n source3: Iterable<T3>,\n source4: Iterable<T4>\n): OperatorFunction<T, [T, T2, T3, T4]>;\n/**\n * Merges multiple iterable sequences into one 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 {Iterable<T2>} source2 The second async-iterable source.\n * @param {Iterable<T3>} source3 The third async-iterable source.\n * @param {Iterable<T4>} source4 The fourth async-iterable source.\n * @param {Iterable<T5>} source5 The fifth async-iterable source.\n * @returns {OperatorFunction<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: Iterable<T2>,\n source3: Iterable<T3>,\n source4: Iterable<T4>,\n source5: Iterable<T5>\n): OperatorFunction<T, [T, T2, T3, T4, T5]>;\n/**\n * Merges multiple iterable sequences into one 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 {Iterable<T2>} source2 The second async-iterable source.\n * @param {Iterable<T3>} source3 The third async-iterable source.\n * @param {Iterable<T4>} source4 The fourth async-iterable source.\n * @param {Iterable<T5>} source5 The fifth async-iterable source.\n * @param {Iterable<T6>} source6 The sixth async-iterable source.\n * @returns {OperatorFunction<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: Iterable<T2>,\n source3: Iterable<T3>,\n source4: Iterable<T4>,\n source5: Iterable<T5>,\n source6: Iterable<T6>\n): OperatorFunction<T, [T, T2, T3, T4, T5, T6]>;\n\n/**\n * Merges multiple iterable sequences into one 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 {...Iterable<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: Iterable<T>[]): OperatorFunction<T, T[]>;\nexport function zipWith<T>(...sources: any[]): OperatorFunction<T, T[]> {\n return function zipWithOperatorFunction(source: Iterable<T>) {\n return new ZipIterable<T>([source, ...sources]);\n };\n}\n"]}