UNPKG

angular-persistence

Version:

A library to handle persistence for Angular 2 applications.

46 lines (45 loc) 1.05 kB
import { IPersistenceContainer } from '../../abstracts/persistence.container'; /** * This is a container that wraps a browser storage object. * * @export * @class BrowserContainer * @implements {IPersistenceContainer} * * @author Scott O'Bryan * @since 1.0 */ export declare class BrowserContainer implements IPersistenceContainer { private _storage; /** * Creates an instance of BrowserContainer. * @param {Storage} _storage */ constructor(_storage: Storage); /** * Sets a value on the browser storage * * @param {string} key * @param {*} value * @returns {boolean} */ set(key: string, value: any): boolean; /** * Gets a value from browser storage * * @param {string} key * @returns {*} */ get(key: string): any; /** * Removes a value from browser storage * * @param {string} key * @returns {*} */ remove(key: string): any; /** * Removes all values from browser storage */ removeAll(): void; }