import * as Cookie from 'js-cookie'; import { JSONObject } from '../models'; import IStorage from '../core/IStorage'; declare class CookieStorage implements IStorage { getItem(key: string): string; removeItem(key: string): void; setItem(key: string, value: string | object, options?: Cookie.CookieAttributes): string; } declare class LocalStorage implements IStorage { constructor(); storage: Storage; getItem(key: string): string; removeItem(key: string): void; setItem(key: string, value: string, options?: any): void; } /** does not store or retrieve any values - allows 'disabling' of storage */ export declare class DummyStorage implements IStorage { getItem(key: any): any; removeItem(key: any): void; setItem(key: any, value: any, options?: any): void; } /** stores items in memory - does not persist across instances */ export declare class MemoryStorage implements IStorage { memoryCache: JSONObject; getItem(key: any): any; removeItem(key: any): void; setItem(key: any, value: any, options?: any): void; } declare class StorageHandler implements IStorage { constructor(options?: { tryLocalStorageFirst: boolean; }); storage: LocalStorage | CookieStorage | DummyStorage | IStorage; triedLocalStorage: boolean; triedCookieStorage: boolean; failover(): void; getItem(key: string): any; removeItem(key: string): void; setItem(key: any, value: string | object, options?: any): string | void; } export default StorageHandler;