/// import { UnaryFunction, OperatorFunction } from '../interfaces.js'; /** * This class serves as the base for all operations which support [Symbol.iterator]. */ export declare abstract class IterableX implements Iterable { abstract [Symbol.iterator](): Iterator; /** @nocollapse */ forEach(projection: (value: T, index: number) => void, thisArg?: any): void; /** @nocollapse */ pipe(...operations: UnaryFunction, R>[]): R; pipe(...operations: OperatorFunction[]): IterableX; pipe(writable: R, options?: { end?: boolean; }): R; /** * Converts an existing string into an iterable of characters. * * @param {string} source The string to convert to an iterable. * @returns {IterableX} An terable stream of characters from the source. */ static as(source: string): IterableX; /** * Converts the iterable like input into an iterable. * * @template T The tyep of elements in the source iterable. * @param {Iterable} source The iterable to convert to an iterable. * @returns {IterableX} An iterable stream of the source sequence. */ static as(source: Iterable): IterableX; /** * Converts an array-like object to an iterable. * * @template T The type of elements in the source array-like sequence. * @param {ArrayLike} source The array-like sequence to convert to an iterable. * @returns {IterableX} The iterable containing the elements from the array-like sequence. */ static as(source: ArrayLike): IterableX; /** * Converts the object into a singleton in an iterable sequence. * * @template T The type of element to turn into an iterable sequence. * @param {T} source The item to turn into an iterable sequence. * @returns {IterableX} An iterable sequence from the source object. */ static as(source: T): IterableX; /** @nocollapse */ static from(source: Iterable | Iterator | ArrayLike, selector?: (value: TSource, index: number) => TResult, thisArg?: any): IterableX; } /** @ignore */ export declare class FromIterable extends IterableX { private _source; private _fn; constructor(source: Iterable | ArrayLike, fn: (value: TSource, index: number) => TResult); [Symbol.iterator](): Generator; } declare module '../iterable/iterablex' { interface IterableX extends Iterable { pipe(): IterableX; pipe(op1: OperatorFunction): IterableX; pipe(op1: OperatorFunction, op2: OperatorFunction): IterableX; pipe(op1: OperatorFunction, op2: OperatorFunction, op3: OperatorFunction): IterableX; pipe(op1: OperatorFunction, op2: OperatorFunction, op3: OperatorFunction, op4: OperatorFunction): IterableX; pipe(op1: OperatorFunction, op2: OperatorFunction, op3: OperatorFunction, op4: OperatorFunction, op5: OperatorFunction): IterableX; pipe(op1: OperatorFunction, op2: OperatorFunction, op3: OperatorFunction, op4: OperatorFunction, op5: OperatorFunction, op6: OperatorFunction): IterableX; pipe(op1: OperatorFunction, op2: OperatorFunction, op3: OperatorFunction, op4: OperatorFunction, op5: OperatorFunction, op6: OperatorFunction, op7: OperatorFunction): IterableX; pipe(op1: OperatorFunction, op2: OperatorFunction, op3: OperatorFunction, op4: OperatorFunction, op5: OperatorFunction, op6: OperatorFunction, op7: OperatorFunction, op8: OperatorFunction): IterableX; pipe(op1: OperatorFunction, op2: OperatorFunction, op3: OperatorFunction, op4: OperatorFunction, op5: OperatorFunction, op6: OperatorFunction, op7: OperatorFunction, op8: OperatorFunction, op9: OperatorFunction): IterableX; pipe(...operations: OperatorFunction[]): IterableX; pipe(op1: A, options?: { end?: boolean; }): A; } } export declare const as: typeof IterableX.as; export declare const from: typeof IterableX.from;