import { AxiosRequestConfig } from 'axios'; export declare enum ResCode { NOT_LOGIN2 = -101, NOT_LOGIN = 503, SUCCESS = 101000, FAIL = 101001, REQUEST_PARAM_NOT_FOUND = 101002, METHOD_ARGUMENT_NOT_VALID_EXCEPTION = 101003, FILE_STORE_ERROR = 101004, FILE_NOT_FOUND_OR_READ = 101005, ASSERT_VALID_ERROR = 101006, USER_TOKEN_VALID_ERROR = 101007, FILE_DELETE_ERROR = 101008, INTERNAL_SYSTEM_ERROR = 101009 } export declare enum OldCode { SUCCESS = 0, SUCCESS2 = 10001 } export type Option = { method?: 'post' | 'get' | 'put'; url: string; data?: any; timeout?: number; baseURL?: string; withCredentials?: boolean; transformRequest?: (params: { [key: string]: any; }) => string; isTransform?: boolean; isDownloadFile?: boolean; /** * 要中断的请求key */ keys?: string[]; /** * 是否可以中断请求 * default: false */ canCancelToken?: boolean; } & AxiosRequestConfig; declare function request(option: Option): Promise; export declare let CancelToken: import("axios").CancelTokenStatic; export { Canceler as C } from 'axios'; export default request;