UNPKG

ngx-store

Version:

Angular decorators to automagically keep variables in HTML5 LocalStorage, SessionStorage, cookies; injectable services for managing and listening to data changes and a bit more.

17 lines (16 loc) 652 B
import { NgxStorageEvent } from './storage-event'; import { Subject } from 'rxjs'; import { StorageName } from '../webstorage.utility'; export declare abstract class NgxStorage implements Storage { [key: string]: any; [index: number]: string; externalChanges?: Subject<NgxStorageEvent>; abstract setItem(key: string, value: any): void; abstract removeItem(key: string): void; abstract getItem(key: string): any; abstract key(index: number): any; abstract clear(): void; abstract get length(): number; abstract get type(): StorageName; protected emitEvent(key: string, newValue: any, oldValue?: any): void; }