UNPKG

@discoveryjs/discovery

Version:

Frontend framework for rapid data (JSON) analysis, shareable serverless reports and dashboards

17 lines (16 loc) 792 B
import { Observer } from '../observer.js'; export type StorageType = 'localStorage' | 'sessionStorage'; export declare const getSessionStorageEntry: <T extends string>(key: string) => PersistentStorageEntry<T>; export declare const getSessionStorageValue: (key: string) => string | null; export declare const getLocalStorageEntry: <T extends string>(key: string) => PersistentStorageEntry<T>; export declare const getLocalStorageValue: (key: string) => string | null; export declare class PersistentStorageEntry<V extends string = string> extends Observer<V | null> { #private; constructor(storage: Storage | null, key: string); get storage(): Storage | null; get key(): string; get(): V | null; set(value: V): boolean; delete(): void; forceSync(): boolean; }