/** * @inline */ type Serializer = { serialize: (value: T) => string; deserialize: (value: string) => T | undefined; }; /** * @inline */ type StorageType = 'local' | 'session'; export type PersistedStateOptions = { /** * Storage key used with local/session storage * * @default 'siv.panel' */ key?: string; /** * The storage type to use. * @default 'local' */ storage?: StorageType; /** The serializer to use. Defaults to `JSON.stringify` and `JSON.parse`. */ serializer?: Serializer; /** * Enable or disable syncing the state changes from other tabs. * @default false */ syncTabs?: boolean; }; /** * Borrowed from {@link https://runed.dev/docs/utilities/persisted-state runed} persisted state with slight modifications. */ export declare class PersistedState { #private; constructor(initialValue: T, options?: PersistedStateOptions); get current(): T; set current(newValue: T); } export {};