tdesign-vue-next-starter/src/types/axios.d.ts
悠静萝莉 88feed0e8c
feat: 将请求分类至api文件夹 (#221)
* feat: 将请求分类至api文件夹

* chore: 修改接口的导入方式为类型,防止vite打包错误
2022-07-10 14:58:21 +08:00

28 lines
564 B
TypeScript

import { AxiosRequestConfig } from 'axios';
export interface RequestOptions {
apiUrl?: string;
isJoinPrefix?: boolean;
urlPrefix?: string;
joinParamsToUrl?: boolean;
formatDate?: boolean;
isTransformResponse?: boolean;
isReturnNativeResponse?: boolean;
ignoreRepeatRequest?: boolean;
joinTime?: boolean;
withToken?: boolean;
retry?: {
count: number;
delay: number;
};
}
export interface Result<T = any> {
code: number;
data: T;
}
export interface AxiosRequestConfigRetry extends AxiosRequestConfig {
retryCount?: number;
}