export interface Ioption { domain?: string; path?: string; expires?: number; secure?: boolean; } export declare type setFn = (key: string, value: any, option?: Ioption) => boolean; export declare type getFn = (key: string) => string | null; export declare type clearFn = (key: string, domain?: string) => boolean; export declare type storeType = 'cookie' | 'localStorage' | 'sessionStorage'; export interface IhandleStorage { set: setFn; get: getFn; clear: clearFn; } export interface Istorage { sessionStorage: IhandleStorage | null; localStorage: IhandleStorage | null; cookie: IhandleStorage | null; get: (key: string, storeType?: storeType) => string | null | undefined; set: (key: string, value: string, storeType?: storeType, option?: Ioption) => boolean; clear: (key: string, storeType?: storeType, domain?: string) => boolean; } export declare const storage: Istorage; export default storage;