UNPKG

@reactivex/ix-esnext-esm

Version:

The Interactive Extensions for JavaScript

1 lines 5.71 kB
{"version":3,"sources":["iterable/operators/concatwith.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAsG3C;;;;;;;;GAQG;AACH,MAAM,UAAU,UAAU,CAAI,GAAG,IAAmB;IAClD,OAAO,SAAS,0BAA0B,CAAC,MAAmB;QAC5D,OAAO,IAAI,cAAc,CAAI,CAAC,MAAM,EAAE,GAAG,IAAI,CAAC,CAAC,CAAC;IAClD,CAAC,CAAC;AACJ,CAAC","file":"concatwith.js","sourcesContent":["import { OperatorFunction } from '../../interfaces';\nimport { ConcatIterable } from '../concat';\n\n/**\n * Concatenates the second iterable sequence to the first iterable sequence upon successful termination of the first.\n *\n * @export\n * @template T The type of the elements in the first source sequence.\n * @template T2 The type of the elements in the second source sequence.\n * @param {Iterable<T>} v1 First iterable source.\n * @param {Iterable<T2>} v2 Second iterable source.\n * @returns {(OperatorFunction<T, T | T2>)} An iterable sequence that contains the elements of the first sequence,\n * followed by those of the second the sequence.\n */\nexport function concatWith<T, T2>(v2: Iterable<T2>): OperatorFunction<T, T | T2>;\n/**\n * Concatenates all iterable sequences in the given sequences, as long as the previous iterable\n * sequence terminated successfully.\n *\n * @export\n * @template T The type of the elements in the first source sequence.\n * @template T2 The type of the elements in the second source sequence.\n * @template T3 The type of the elements in the third source sequence.\n * @param {Iterable<T>} v1 First iterable source.\n * @param {Iterable<T2>} v2 Second iterable source.\n * @param {Iterable<T3>} v3 Third iterable source.\n * @returns {(OperatorFunction<T, T | T2 | T3>)} An iterable sequence that contains the elements of each given sequence,\n * in sequential order.\n */\nexport function concatWith<T, T2, T3>(\n v2: Iterable<T2>,\n v3: Iterable<T3>\n): OperatorFunction<T, T | T2 | T3>;\n/**\n * Concatenates all iterable sequences in the given sequences, as long as the previous iterable\n * sequence terminated successfully.\n *\n * @export\n * @template T The type of the elements in the first source sequence.\n * @template T2 The type of the elements in the second source sequence.\n * @template T3 The type of the elements in the third source sequence.\n * @template T4 The type of the elements in the fourth source sequence.\n * @param {Iterable<T2>} v2 Second iterable source.\n * @param {Iterable<T3>} v3 Third iterable source.\n * @param {Iterable<T4>} v4 Fourth iterable source.\n * @returns {(OperatorFunction<T, T | T2 | T3 | T4>)} An iterable sequence that contains the elements of each\n * given sequence, in sequential order.\n */\nexport function concatWith<T, T2, T3, T4>(\n v2: Iterable<T2>,\n v3: Iterable<T3>,\n v4: Iterable<T4>\n): OperatorFunction<T, T | T2 | T3 | T4>;\n/**\n * Concatenates all iterable sequences in the given sequences, as long as the previous iterable\n * sequence terminated successfully.\n *\n * @export\n * @template T The type of the elements in the first source sequence.\n * @template T2 The type of the elements in the second source sequence.\n * @template T3 The type of the elements in the third source sequence.\n * @template T4 The type of the elements in the fourth source sequence.\n * @template T5 The type of the elements in the fifth source sequence.\n * @param {Iterable<T2>} v2 Second iterable source.\n * @param {Iterable<T3>} v3 Third iterable source.\n * @param {Iterable<T4>} v4 Fourth iterable source.\n * @param {Iterable<T5>} v5 Fifth iterable source.\n * @returns {(OperatorFunction<T, T | T2 | T3 | T4 | T5>)} An iterable sequence that contains the elements of each\n * given sequence, in sequential order.\n */\nexport function concatWith<T, T2, T3, T4, T5>(\n v2: Iterable<T2>,\n v3: Iterable<T3>,\n v4: Iterable<T4>,\n v5: Iterable<T5>\n): OperatorFunction<T, T | T2 | T3 | T4 | T5>;\n/**\n * Concatenates all iterable sequences in the given sequences, as long as the previous iterable\n * sequence terminated successfully.\n *\n * @export\n * @template T The type of the elements in the first source sequence.\n * @template T2 The type of the elements in the second source sequence.\n * @template T3 The type of the elements in the third source sequence.\n * @template T4 The type of the elements in the fourth source sequence.\n * @template T5 The type of the elements in the fifth source sequence.\n * @template T6 The type of the elements in the sixth source sequence.\n * @param {Iterable<T2>} v2 Second iterable source.\n * @param {Iterable<T3>} v3 Third iterable source.\n * @param {Iterable<T4>} v4 Fourth iterable source.\n * @param {Iterable<T5>} v5 Fifth iterable source.\n * @param {Iterable<T6>} v6 Sixth iterable source.\n * @returns {(OperatorFunction<T, T | T2 | T3 | T4 | T5 | T6>)} An iterable sequence that contains the elements of each\n * given sequence, in sequential order.\n */\nexport function concatWith<T, T2, T3, T4, T5, T6>(\n v2: Iterable<T2>,\n v3: Iterable<T3>,\n v4: Iterable<T4>,\n v5: Iterable<T5>,\n v6: Iterable<T6>\n): OperatorFunction<T, T | T2 | T3 | T4 | T5 | T6>;\n\n/**\n * Concatenates all iterable sequences in the given sequences, as long as the previous iterable\n * sequence terminated successfully.\n *\n * @export\n * @template T The type of the elements in the sequences.\n * @param {...Iterable<T>[]} args The iterable sources.\n * @returns {AsyncIterableX<T>} An iterable sequence that contains the elements of each given sequence, in sequential order.\n */\nexport function concatWith<T>(...args: Iterable<T>[]): OperatorFunction<T, T> {\n return function concatWithOperatorFunction(source: Iterable<T>) {\n return new ConcatIterable<T>([source, ...args]);\n };\n}\n"]}