import { AsyncSequence } from "../../sequency"; export declare class FoldIndexed { /** * Accumulates all elements of the sequence into a single result by applying the given `operation` starting with * the `initial` value. The result of the last operation will be passed as accumulated value to the getNext invocation * of the operation as well as the `index` of the current element (zero-based) until all elements of the sequence * are processed. * * @param {R} initial * @param {(index: number, acc: R, element: T) => Promise | R} operation * @returns {Promise} */ foldIndexed(this: AsyncSequence, initial: R, operation: (index: number, acc: R, element: T) => Promise | R): Promise; }