type Serializer<T> = {
    parse: (text: string) => T;
    stringify: (object: T) => string;
};
type StorageType = 'local' | 'session' | 'cookie';
interface CookieOptions {
    expireDays?: number;
    maxAge?: number;
    path?: string;
    domain?: string;
    secure?: boolean;
    sameSite?: 'Strict' | 'Lax' | 'None';
    httpOnly?: boolean;
}
interface Options<T> {
    storage?: StorageType;
    serializer?: Serializer<T>;
    syncTabs?: boolean;
    /** @deprecated Use cookieOptions.expireDays instead */
    cookieExpireDays?: number;
    cookieOptions?: CookieOptions;
    onWriteError?: (error: unknown) => void;
    onParseError?: (error: unknown) => void;
    beforeRead?: (value: T) => T;
    beforeWrite?: (value: T) => T;
}
export declare function persistedState<T>(key: string, initialValue: T, options?: Options<T>): {
    /**
     * @deprecated Use current to align with Svelte conventions
     */
    value: T;
    current: T;
    reset(): void;
};
export {};
