import { IObservableWithChange, IObserver, IReader, IObservable } from "../base.js";
import { DisposableStore } from "../commonFacade/deps.js";
import { DebugOwner } from "../debugName.js";
import type { keepObserved, recomputeInitiallyAndOnChange } from "../utils/utils.js";
import { derivedOpts } from "./derived.js";
declare let _derived: typeof derivedOpts;
export declare function _setDerivedOpts(derived: typeof _derived): void;
declare let _recomputeInitiallyAndOnChange: typeof recomputeInitiallyAndOnChange;
export declare function _setRecomputeInitiallyAndOnChange(recomputeInitiallyAndOnChange: typeof _recomputeInitiallyAndOnChange): void;
declare let _keepObserved: typeof keepObserved;
export declare function _setKeepObserved(keepObserved: typeof _keepObserved): void;
export declare abstract class ConvenientObservable<T, TChange> implements IObservableWithChange<T, TChange> {
    get TChange(): TChange;
    abstract get(): T;
    reportChanges(): void;
    abstract addObserver(observer: IObserver): void;
    abstract removeObserver(observer: IObserver): void;
    read(reader: IReader | undefined): T;
    map<TNew>(fn: (value: T, reader: IReader) => TNew): IObservable<TNew>;
    map<TNew>(owner: DebugOwner, fn: (value: T, reader: IReader) => TNew): IObservable<TNew>;
    abstract log(): IObservableWithChange<T, TChange>;
    flatten<TNew>(this: IObservable<IObservableWithChange<TNew, any>>): IObservable<TNew>;
    recomputeInitiallyAndOnChange(store: DisposableStore, handleValue?: (value: T) => void): IObservable<T>;
    keepObserved(store: DisposableStore): IObservable<T>;
    abstract get debugName(): string;
    protected get debugValue(): T;
}
export declare abstract class BaseObservable<T, TChange = void> extends ConvenientObservable<T, TChange> {
    protected readonly _observers: Set<IObserver>;
    constructor();
    addObserver(observer: IObserver): void;
    removeObserver(observer: IObserver): void;
    protected onFirstObserverAdded(): void;
    protected onLastObserverRemoved(): void;
    log(): IObservableWithChange<T, TChange>;
    debugGetObservers(): Set<IObserver>;
}
export {};
