import Agile from "./agile"; import State from "./state"; import Collection from "./collection"; export declare type StorageKey = string | number; export interface StorageConfigInterface { async?: boolean; prefix?: string; methods?: { get: (key: string) => any; set: (key: string, value: any) => void; remove: (key: string) => void; }; } export default class Storage { agileInstance: () => Agile; isAsync: boolean; private storageReady; private storageType; private storagePrefix; private storageConfig; persistedStates: Set; persistedCollections: Set; constructor(agileInstance: Agile, storageConfig: StorageConfigInterface); /** * This instantiate the Local Storage */ private instantiateLocalStorage; /** * This instantiate the Custom Storage */ private instantiateCustomStorage; /** * Gets the value provided by the key from the storage */ get(key: StorageKey): GetType | Promise | undefined; /** * Sets the value into the storage */ set(key: StorageKey, value: any): void; /** * Deletes the value that is stored with the key */ remove(key: StorageKey): void; private getStorageKey; private localStorageAvailable; }