/** * Store LocalStorage * 该类提供与浏览器 localStorage 交互的方法, 支持加密存储 */ export declare class XYStore { static MIX_KEY_MAP: { [key: string]: string; }; /** * 设置 localStorage 中的项目 * * @param { string } key - 存储值的键 * @param { unknown } value - 要存储的值,可以是任意类型 * @param { boolean } isEncrypt - 是否加密 */ static set(key: string, value: unknown, isEncrypt?: boolean): void; /** * 从 localStorage 中获取项目 * * @param { string } key - 要检索的项目的键 * @param { boolean } isDecrypt - 是否解密 * @returns { * } - 与键关联的值,如果未找到则返回空字符串 */ static get(key: string, isDecrypt?: boolean): any; /** * 从 localStorage 中删除项目 * * @param { string } key - 要删除的项目的键 */ static remove(key: string): void; /** * 清除 localStorage 中的所有项目 */ static clear(): void; /** * 从 localStorage 中批量删除项目 * * @param { string[] } array - 要删除的键的数组 */ static removeList(array: string[]): void; /** * 序列化要存储的值 * * @param { unknown } value - 要序列化的值,可以是任意类型 * @returns { string } - 序列化后的值 */ static serialize(value: unknown): string; private static getKey; private static encrypt; private static decrypt; }