import type { AxiosInstance } from "axios"; import type { CustomAxiosRequestConfig } from "./types"; export interface LoginExpiredContext { instance: AxiosInstance; getRefreshToken: () => string | null; clearAuth: () => void; shouldSkipRefresh: (url: string) => boolean; doRefresh: () => Promise; getRefreshPromise: () => Promise | null; setRefreshPromise: (promise: Promise | null) => void; } type RequestConfig = CustomAxiosRequestConfig & { url?: string; }; export type LoginExpiredPayload = { config: RequestConfig; response?: unknown; } | { config: RequestConfig; data?: unknown; }; /** * 生成登录失效处理器。 * axios 只负责把失效请求交给这个处理器,事件和重试都在这里完成。 */ export declare function createHandleLoginExpired(context: LoginExpiredContext): (payload: LoginExpiredPayload) => Promise; export {}; //# sourceMappingURL=handleLoginExpired.d.ts.map