import { IObservable, IObservableWithChange, IObserver, IReaderWithStore } from '../base';
import { DebugNameData } from '../debugName';
import { DisposableStore, IDisposable } from '../commonFacade/deps';
import { IChangeTracker } from '../changeTracker';
import { DebugLocation } from '../debugLocation';
export declare const enum AutorunState {
    /**
     * A dependency could have changed.
     * We need to explicitly ask them if at least one dependency changed.
     */
    dependenciesMightHaveChanged = 1,
    /**
     * A dependency changed and we need to recompute.
     */
    stale = 2,
    upToDate = 3
}
export declare class AutorunObserver<TChangeSummary = any> implements IObserver, IReaderWithStore, IDisposable {
    readonly _debugNameData: DebugNameData;
    readonly _runFn: (reader: IReaderWithStore, changeSummary: TChangeSummary) => void;
    private readonly _changeTracker;
    private _state;
    private _updateCount;
    private _disposed;
    private _dependencies;
    private _dependenciesToBeRemoved;
    private _changeSummary;
    private _isRunning;
    private _iteration;
    get debugName(): string;
    constructor(_debugNameData: DebugNameData, _runFn: (reader: IReaderWithStore, changeSummary: TChangeSummary) => void, _changeTracker: IChangeTracker<TChangeSummary> | undefined, debugLocation: DebugLocation);
    dispose(): void;
    private _run;
    toString(): string;
    beginUpdate(_observable: IObservable<any>): void;
    endUpdate(_observable: IObservable<any>): void;
    handlePossibleChange(observable: IObservable<any>): void;
    handleChange<T, TChange>(observable: IObservableWithChange<T, TChange>, change: TChange): void;
    private _isDependency;
    private _ensureNoRunning;
    readObservable<T>(observable: IObservable<T>): T;
    private _store;
    get store(): DisposableStore;
    private _delayedStore;
    get delayedStore(): DisposableStore;
    debugGetState(): {
        isRunning: boolean;
        updateCount: number;
        dependencies: Set<IObservable<any>>;
        state: AutorunState;
        stateStr: string;
    };
    debugRerun(): void;
    private _checkIterations;
}
//# sourceMappingURL=autorunImpl.d.ts.map