import { OperatorAsyncFunction } from '../../interfaces.js'; import { ZipAsyncIterable } from '../zip.js'; /** * Merges multiple async-iterable sequences into one async-iterable sequence by combining their elements in a pairwise fashion. * * @template T The type of the first async-iterable sequence. * @template T2 The type of the second async-iterable sequence. * @param {AsyncIterable} source2 The second async-iterable source. * @returns {OperatorAsyncFunction} Async iterable with an array of each element from the source sequences in a pairwise fashion. */ export function zipWith(source2: AsyncIterable): OperatorAsyncFunction; /** * Merges multiple async-iterable sequences into one async-iterable sequence by combining their elements in a pairwise fashion. * * @template T The type of the first async-iterable sequence. * @template T2 The type of the second async-iterable sequence. * @template T3 The type of the third async-iterable sequence. * @param {AsyncIterable} source2 The second async-iterable source. * @param {AsyncIterable} source3 The third async-iterable source. * @returns {OperatorAsyncFunction} Async iterable with an array of each element from the source sequences in a pairwise fashion. */ export function zipWith( source2: AsyncIterable, source3: AsyncIterable ): OperatorAsyncFunction; /** * Merges multiple async-iterable sequences into one async-iterable sequence by combining their elements in a pairwise fashion. * * @template T The type of the first async-iterable sequence. * @template T2 The type of the second async-iterable sequence. * @template T3 The type of the third async-iterable sequence. * @template T4 The type of the fourth async-iterable sequence. * @param {AsyncIterable} source2 The second async-iterable source. * @param {AsyncIterable} source3 The third async-iterable source. * @param {AsyncIterable} source4 The fourth async-iterable source. * @returns {OperatorAsyncFunction} Async iterable with an array of each element from the source sequences in a pairwise fashion. */ export function zipWith( source2: AsyncIterable, source3: AsyncIterable, source4: AsyncIterable ): OperatorAsyncFunction; /** * Merges multiple async-iterable sequences into one async-iterable sequence by combining their elements in a pairwise fashion. * * @template T The type of the first async-iterable sequence. * @template T2 The type of the second async-iterable sequence. * @template T3 The type of the third async-iterable sequence. * @template T4 The type of the fourth async-iterable sequence. * @template T5 The type of the fifth async-iterable sequence. * @param {AsyncIterable} source2 The second async-iterable source. * @param {AsyncIterable} source3 The third async-iterable source. * @param {AsyncIterable} source4 The fourth async-iterable source. * @param {AsyncIterable} source5 The fifth async-iterable source. * @returns {OperatorAsyncFunction} Async iterable with an array of each element from the source * sequences in a pairwise fashion. */ export function zipWith( source2: AsyncIterable, source3: AsyncIterable, source4: AsyncIterable, source5: AsyncIterable ): OperatorAsyncFunction; /** * Merges multiple async-iterable sequences into one async-iterable sequence by combining their elements in a pairwise fashion. * * @template T The type of the first async-iterable sequence. * @template T2 The type of the second async-iterable sequence. * @template T3 The type of the third async-iterable sequence. * @template T4 The type of the fourth async-iterable sequence. * @template T5 The type of the fifth async-iterable sequence. * @template T6 The type of the sixth async-iterable sequence. * @param {AsyncIterable} source2 The second async-iterable source. * @param {AsyncIterable} source3 The third async-iterable source. * @param {AsyncIterable} source4 The fourth async-iterable source. * @param {AsyncIterable} source5 The fifth async-iterable source. * @param {AsyncIterable} source6 The sixth async-iterable source. * @returns {OperatorAsyncFunction} Async iterable with an array of each element from the source * sequences in a pairwise fashion. */ export function zipWith( source2: AsyncIterable, source3: AsyncIterable, source4: AsyncIterable, source5: AsyncIterable, source6: AsyncIterable ): OperatorAsyncFunction; /** * Merges multiple async-iterable sequences into one async-iterable sequence by combining their elements in a pairwise fashion. * * @template T The type of elements in the source sequences. * @param {...AsyncIterable[]} sources The source sequences. * @returns {AsyncIterableX} Async iterable with an array of each element from the source sequences in a pairwise fashion. */ export function zipWith(...sources: AsyncIterable[]): OperatorAsyncFunction; export function zipWith(...sources: any[]): OperatorAsyncFunction { return function zipWithOperatorFunction(source: AsyncIterable) { return new ZipAsyncIterable([source, ...sources]); }; }