declare type TStorageType = "localStorage" | "sessionStorage"; interface TAuthInitArg { storageKey: string; storageType: TStorageType; } interface TToken { access: string; refresh: string; } declare enum TLoginResultStatus { success = 1, failure = 0 } interface TLoginResult { status: TLoginResultStatus; token?: TToken; msg?: string; } export interface TAccountInfo { account: string; password: string; token?: TToken; } declare class Auth { private __storageType__; private __storageKey__; constructor({ storageType, //默认值 storageKey }: TAuthInitArg); get isLogined(): boolean; get accountInfo(): TAccountInfo; __updateAccountInfo__: (accountInfo: TAccountInfo) => void; login: (condition: TAccountInfo) => Promise; logout: () => void; } declare const theAuth: Auth; export { theAuth };