@xompass/sdk-cloud-api
Version:
Xompass Client for cloud-api
35 lines (34 loc) • 1.05 kB
TypeScript
import { ClientStorage } from './ClientStorage';
export declare class BrowserStorage implements ClientStorage {
/**
* @method get
* @param key Storage key name
* @description
* The getter will return any type of data persisted in localStorage.
*/
get(key: string): any;
/**
* @method set
* @param key Storage key name
* @param value Any value
* @param [expires] The date of expiration (Optional)
* @description
* The setter will return any type of data persisted in localStorage.
*/
set(key: string, value: any, expires?: Date): void;
/**
* @method remove
* @param key Storage key name
* @description
* This method will remove a localStorage item from the client.
*/
remove(key: string): void;
/**
* @method parse
* @param value Input data expected to be JSON
* @description
* This method will parse the string as JSON if possible, otherwise will
* return the value itself.
*/
private static parse;
}