import { EventEmitter } from "@angular/core";
export declare class CacheField<T> {
    readonly onLoad: EventEmitter<any>;
    get value(): T;
    set value(value: T);
    get isLoaded(): boolean;
    get isLoading(): boolean;
    get loadNeverCalled(): boolean;
    loadFunction: (params?: any) => Promise<T>;
    private _promiseValue;
    private _value;
    private _isLoaded;
    constructor();
    getValue(forceReload?: boolean): Promise<T>;
    setValue(value: any): void;
    /**
     * POSTCONDITION: The .value of this cache field contains the loaded value as fetched by the resolve data of its .loadFunction.
     * Will load only once, consecutive calls will resolve immediately or wait until the first original database fetch was finished.
     * @returns {Promise<any>} Postcondition holds after resolve
     */
    ensureLoaded(forceReload?: boolean): Promise<T>;
    reload(): Promise<T>;
    reset(): void;
    private _load;
}
