UNPKG

6.2 kBSource Map (JSON)View Raw
1{"version":3,"sources":["iterable/concat.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,MAAM,OAAO,cAAwB,SAAQ,SAAkB;IAG7D,YAAY,MAAmC;QAC7C,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;IACxB,CAAC;IAED,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC;QAChB,KAAK,MAAM,KAAK,IAAI,IAAI,CAAC,OAAO,EAAE;YAChC,KAAK,CAAC,CAAC,KAAK,CAAC;SACd;IACH,CAAC;CACF;AA0GD;;;;;;;;GAQG;AACH,MAAM,UAAU,MAAM,CAAI,GAAG,IAAmB;IAC9C,OAAO,IAAI,cAAc,CAAI,IAAI,CAAC,CAAC;AACrC,CAAC","file":"concat.js","sourcesContent":["import { IterableX } from './iterablex';\n\nexport class ConcatIterable<TSource> extends IterableX<TSource> {\n private _source: Iterable<Iterable<TSource>>;\n\n constructor(source: Iterable<Iterable<TSource>>) {\n super();\n this._source = source;\n }\n\n *[Symbol.iterator]() {\n for (const outer of this._source) {\n yield* outer;\n }\n }\n}\n\nexport function concat<T>(v1: Iterable<T>): IterableX<T>;\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 {(IterableX<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 concat<T, T2>(v1: Iterable<T>, v2: Iterable<T2>): IterableX<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 {(IterableX<T | T2 | T3>)} An iterable sequence that contains the elements of each given sequence, in sequential order.\n */\nexport function concat<T, T2, T3>(\n v1: Iterable<T>,\n v2: Iterable<T2>,\n v3: Iterable<T3>\n): IterableX<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<T>} v1 First iterable source.\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 {(IterableX<T | T2 | T3 | T4>)} An iterable sequence that contains the elements of each given sequence, in sequential order.\n */\nexport function concat<T, T2, T3, T4>(\n v1: Iterable<T>,\n v2: Iterable<T2>,\n v3: Iterable<T3>,\n v4: Iterable<T4>\n): IterableX<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<T>} v1 First iterable source.\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 {(Iterable<T | T2 | T3 | T4 | T5>)} An iterable sequence that contains the elements of each given sequence, in sequential order.\n */\nexport function concat<T, T2, T3, T4, T5>(\n v1: Iterable<T>,\n v2: Iterable<T2>,\n v3: Iterable<T3>,\n v4: Iterable<T4>,\n v5: Iterable<T5>\n): Iterable<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<T>} v1 First iterable source.\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 {(Iterable<T | T2 | T3 | T4 | T5 | T6>)} An iterable sequence that contains the elements of each given sequence, in sequential order.\n */\nexport function concat<T, T2, T3, T4, T5, T6>(\n v1: Iterable<T>,\n v2: Iterable<T2>,\n v3: Iterable<T3>,\n v4: Iterable<T4>,\n v5: Iterable<T5>,\n v6: Iterable<T6>\n): Iterable<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 {IterableX<T>} An iterable sequence that contains the elements of each given sequence, in sequential order.\n */\nexport function concat<T>(...args: Iterable<T>[]): IterableX<T> {\n return new ConcatIterable<T>(args);\n}\n"]}
\No newline at end of file