UNPKG

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.

21 lines (20 loc) 929 B
import { StorageStrategy } from '../core/interfaces/storageStrategy'; import { Subject } from 'rxjs'; export declare const InvalidStrategyError = "invalid_strategy"; export declare class StrategyIndex { protected strategies: StorageStrategy<any>[]; static index: { [name: string]: StorageStrategy<any>; }; readonly registration$: Subject<string>; constructor(strategies: StorageStrategy<any>[]); static get(name: string): StorageStrategy<any>; static set(name: string, strategy: any): void; static clear(name?: string): void; static isStrategyRegistered(name: string): boolean; static hasRegistredStrategies(): boolean; getStrategy(name: string): StorageStrategy<any>; indexStrategies(): void; indexStrategy(name: string, overrideIfExists?: boolean): StorageStrategy<any>; register(name: string, strategy: StorageStrategy<any>, overrideIfExists?: boolean): void; }