ngx-webstorage
Version:
This library provides an easy to use service to manage the web storages (local and session) from your Angular application. It provides also two decorators to synchronize the component attributes and the web storages.
18 lines (17 loc) • 779 B
TypeScript
import { StorageStrategy } from '../core/interfaces/storageStrategy';
import { Observable, Subject } from 'rxjs';
import { StrategyCacheService } from '../core/strategyCache';
import { WebStorage } from '../core/interfaces/webStorage';
export declare abstract class BaseSyncStorageStrategy implements StorageStrategy<any> {
protected storage: WebStorage;
protected cache: StrategyCacheService;
readonly keyChanges: Subject<string>;
abstract readonly name: string;
constructor(storage: WebStorage, cache: StrategyCacheService);
protected _isAvailable: boolean;
get isAvailable(): boolean;
get(key: string): Observable<any>;
set(key: string, value: any): Observable<any>;
del(key: string): Observable<void>;
clear(): Observable<void>;
}