UNPKG

@zuiwoxing/posisi

Version:

一款基于typescript 前端控制组件,包括(IOC,AOP,Feign,Logger,Util等)

47 lines (46 loc) 1.18 kB
import { StorageApi } from "/@/common/adapter/StorageApi"; /** * 本地存储工具 * @desc * @author liudejian * @date 2020-03-26 17:54 */ export declare class StorageUtil { static storageApi: StorageApi; static setStorageApi(storageApi: StorageApi): void; static isObject(object: any): boolean; /** * 返回所有localStorage中的keys */ static getLocalStorageKeys(): Array<string>; /** * 返回sessionStorage中所有key */ static getSessionStorageKeys(): Array<string>; /** * session存储 * @param key * @param value */ static setSessionStorage(key: string, value: any): void; /** * session获取 * @param key */ static getSessionStorage(key: string): any; static removeSessionStorage(key: string): void; static clearSessionStorage(): void; /** * session存储 * @param key * @param value */ static setLocalStorage(key: string, value: any): void; /** * session获取 * @param key */ static getLocalStorage(key: string): any; static removeLocalStorage(key: string): void; static clearLocalStorage(): void; }