import { EqualityComparer } from "../equals.js";
import { IObservable, IObservableWithChange, ISettableObservable } from "./base.js";
import { IChangeTracker } from "./changeTracker.js";
import { DebugOwner } from "./debugName.js";
import { IDerivedReader } from "./derived.js";
export interface IReducerOptions<T, TChangeSummary = void, TOutChange = void> {
    initial: T | (() => T);
    disposeFinal?(value: T): void;
    changeTracker?: IChangeTracker<TChangeSummary>;
    equalityComparer?: EqualityComparer<T>;
    update(reader: IDerivedReader<TOutChange>, previousValue: T, changes: TChangeSummary): T;
}
export declare function observableReducer<T, TInChanges, TOutChange = void>(owner: DebugOwner, options: IReducerOptions<T, TInChanges, TOutChange>): SimplifyObservableWithChange<T, TOutChange>;
export declare function observableReducerSettable<T, TInChanges, TOutChange = void>(owner: DebugOwner, options: IReducerOptions<T, TInChanges, TOutChange>): ISettableObservable<T, TOutChange>;
type SimplifyObservableWithChange<T, TChange> = TChange extends void ? IObservable<T> : IObservableWithChange<T, TChange>;
export {};
