import { OutputCommit } from '../queryHandler/types';
import { BaseEntity, BaseEvent, Commit, ORGAN_FIELD, TRACK_FIELD } from '.';
export declare type Reducer<TEntity = any, TEvent = any> = (history: TEvent[], initial?: TEntity) => TEntity;
export declare type ReducerCallback<TEntity extends BaseEntity, TEvent extends BaseEvent> = (entity: TEntity, event: TEvent) => TEntity;
export declare const getReducer: <T extends BaseEntity, E extends BaseEvent>(callback: ReducerCallback<T, E>) => Reducer<T, E>;
export declare const trackingReducer: (commits: Commit[]) => {
    _organization: any[];
    _privateData: {};
} | {
    _organization: any[];
    _privateData?: undefined;
} | {
    _privateData: {};
    _organization?: undefined;
};
export declare const computeEntity: <T extends BaseEntity, E extends BaseEvent>(commits: (Commit | OutputCommit)[], reducer: Reducer<T, E>) => {
    reduced: boolean;
    state?: undefined;
} | {
    state: T;
    reduced: boolean;
};
