UNPKG

@mamba-le/auth

Version:
77 lines (76 loc) 2.02 kB
export declare class AuthOptions { /** 持久化序列化 */ static jsonify: boolean; /** * 日志输出 * @param namespace * @param args */ static log(namespace: string, ...args: any[]): void; /** * 日志输出带堆栈记录 * @static * @param {string} namespace * @param {*} args * @memberof AuthOptions */ static trace(namespace: string, ...args: any[]): void; /** * 微信 小程序 浏览器 * @readonly * @memberof XTGlobal */ static get isWeappBowser(): boolean; /** * 是否浏览器环境 * @readonly * @memberof AppConfig */ static get browser(): boolean; /** * 微前端环境 * @readonly * @static * @memberof AuthOptions */ static get micro(): boolean; private static LocalforageKey; private static _LocalForage; /** * localforage 访问器 * @readonly * @private * @static * @memberof AuthOptions */ static get LocalForage(): LocalForage; /** * 创建 storage * @static * @return {*} * @memberof AuthOptions */ static createStorage(): { clear(): void; setItem(key: any, value: any): void; removeItem(key: any): void; getItem(key: any): void; } | { clear: (callback?: (err: any) => void) => Promise<void>; setItem: <T>(key: string, value: T, callback?: (err: any, value: T) => void) => Promise<T>; removeItem: (key: string, callback?: (err: any) => void) => Promise<void>; getItem: <T_1>(key: string, callback?: (err: any, value: T_1) => void) => Promise<T_1>; }; /** * 持久化 mobx-persist * @static * @memberof basesOptions */ static createHydrate(): <T extends Object>(key: string, store: T, initialState?: any) => import("mobx-persist").IHydrateResult<T>; /** * 写入校验 * @static * @memberof AuthOptions */ static writeCheck(): void; }