jinbi-utils
Version:
这是一个实用工具库,包含了多个常用的功能模块。以下是各个模块的详细说明:
18 lines (17 loc) • 596 B
TypeScript
import { AxiosInstance } from "axios";
interface IHttp {
cacheType: 'localStorage' | 'sessionStorage' | 'both';
currentMode: string;
errorCb?: (error: any) => void;
getTokenCb?: () => void;
tokenKey?: 'token';
}
/**
* @param cacheType localStorage | sessionStorage | both
* @param currentMode local | dev | test | prod 等自定义mode
* @param errorCb 错误回调
* @param getTokenCb 获取token的回调
* @param tokenKey
* */
export declare const http: ({ cacheType, currentMode, errorCb, getTokenCb, tokenKey }: IHttp) => AxiosInstance;
export {};