UNPKG

angular-persistence

Version:

A library to handle persistence for Angular 2 applications.

30 lines (29 loc) 729 B
import { MemoryStorage } from './storage.memory'; /** * Storage type for immutable memory * * @export * @class ImmutableMemoryStorage * @extends {MemoryStorage} * * @author Scott O'Bryan * @since 1.0 */ export declare class ImmutableMemoryStorage extends MemoryStorage { /** * Sets a value in memory storage after stringifying the object. This * add some overhead but ensures each copy of the object is immutable. * * @param {string} key * @param {*} value * @returns {boolean} */ set(key: string, value: any): boolean; /** * Returns an immutable value for the specified key. * * @param {string} key * @returns {*} */ get(key: string): any; }