import { Loader, LoaderOptions } from './Loader';
import { ActionImpl } from '../action/ActionImpl';
/**
* A `Loader` can follow the changes in some input data, and prepare some output data accordingly.
*
* Let's assume that there is a value ("output") that depends on some other value ("input"),
* and can be derived from it using an asynchronous function.
*
* One example would be loading some data from an external source, based on an ID or other criteria.
*
* A `Loader` can do this for you: it watches the input, and maintains the output accordingly.
*/
export declare class LoaderImpl implements Loader {
private readonly _options;
private readonly _logger;
constructor(_options: LoaderOptions);
/**
* The last input value that we have seen
*
* ... and fetched data for, or decide to skip
*/
private _fetchedForInput?;
private _checkedAt?;
private get __hasInputChanged();
private get _cacheTime();
private get _areWeUpToDate();
private _relaxing;
/**
* Relax, stop following changes
*/
relax(): void;
private _tick;
private _clearSchedule;
private _scheduleNext;
/**
* Internal loader wrapping the loading
* @private
*/
private readonly _load;
private _fetchIfWeHaveTo;
/**
* Make sure that we are up-to-date!
*
* * ... unless we are sleeping. If we are sleeping, do nothing.
*/
private _update;
readonly refresh: ActionImpl;
private _sleeping;
private _timer;
/**
* Start to listen
*/
init(): void;
/**
* Get the current input
*/
get input(): Input | undefined;
/**
* Find out if we should skip loading
*/
private get _shouldSkip();
/**
* Are we loading now?
*/
get loading(): boolean;
get errorMessage(): string | undefined;
_value?: Output;
/**
* Return the value
*/
get value(): Output | undefined;
setValue(value?: Output): void;
}