import { Observable } from '../Observable'; import { Operator } from '../Operator'; import { Subscriber } from '../Subscriber'; export declare function reduce(this: Observable, accumulator: (acc: T, value: T, index: number) => T, seed?: T): Observable; export declare function reduce(this: Observable, accumulator: (acc: T[], value: T, index: number) => T[], seed?: T[]): Observable; export declare function reduce(this: Observable, accumulator: (acc: R, value: T, index: number) => R, seed?: R): Observable; export declare class ReduceOperator implements Operator { private accumulator; private seed; private hasSeed; constructor(accumulator: (acc: R, value: T) => R, seed?: R, hasSeed?: boolean); call(subscriber: Subscriber, source: any): any; } /** * We need this JSDoc comment for affecting ESDoc. * @ignore * @extends {Ignored} */ export declare class ReduceSubscriber extends Subscriber { private accumulator; private hasSeed; acc: T | R; hasValue: boolean; constructor(destination: Subscriber, accumulator: (acc: R, value: T) => R, seed: R, hasSeed: boolean); protected _next(value: T): void; private _tryReduce(value); protected _complete(): void; }