UNPKG

@lomray/react-mobx-manager

Version:
48 lines (47 loc) 907 B
import { IStorage } from "../types.js"; interface ILocalStorageOptions { globalKey?: string; storage?: Storage; } /** * Local storage for mobx store manager */ declare class LocalStorage implements IStorage { /** * Local storage key */ protected globalKey: string; /** * @protected */ protected storage: Storage; /** * @constructor */ /** * @constructor */ constructor({ storage, globalKey }?: ILocalStorageOptions); /** * @inheritDoc */ /** * @inheritDoc */ get(): Record<string, any> | Promise<Record<string, any> | undefined>; /** * @inheritDoc */ /** * @inheritDoc */ flush(): void | Promise<any>; /** * @inheritDoc */ /** * @inheritDoc */ set(value: Record<string, any> | undefined): void; } export { LocalStorage as default };