///
import { Store } from './store';
export declare class Request {
private promise;
private args;
private id;
private shouldHandleRequest;
private shouldHandleResponse;
private clear;
private createRequest;
do(args: any[], fetch: Function, onSuccess: Function, onError: Function): any;
}
export declare class Cache {
protected cacher: Function;
protected getter: Function;
protected catcher: Function;
private fetcher;
private readonly request;
protected getCache(...args: any[]): void;
protected setCache(...args: any[]): void;
protected setError(...args: any[]): void;
private fetchAndSetCache;
cacheWith(cacher: Function): Cache;
getWith(getter: Function): Cache;
fetchWith(fetcher: Function): Cache;
catchWith(catcher: Function): Cache;
/**
* Returns cached value if exists, otherwise fetches and sets a new value
*/
get(...args: any[]): ng.IPromise;
/**
* Fetches and sets a new value
*/
fetch(...args: any[]): ng.IPromise;
}
export declare class StoreCache extends Cache {
private readonly store;
private readonly branch;
constructor(store: Store, branch: string);
protected getCache(...args: any[]): T;
protected setCache(...args: any[]): ng.IPromise;
protected setError(...args: any[]): ng.IPromise;
}