/** 安全读取 localStorage,异常时返回默认值 */ export declare const safeGetStorage: (key: string, defaultValue?: string) => string; /** * 安全读取 localStorage 并解析 JSON,解析失败或类型不匹配时清除被篡改的 key 并返回默认值 * - defaultValue 为数组时,解析结果也必须为数组 * - defaultValue 为对象时,解析结果也必须为普通对象(非数组、非 null) */ export declare const safeGetStorageJSON: (key: string, defaultValue?: T) => T; /** 安全写入 localStorage,存储满或被禁用时静默失败 */ export declare const safeSetStorage: (key: string, value: string) => void;