index.d.cts 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561
  1. interface RawAxiosHeaders {
  2. [key: string]: axios.AxiosHeaderValue;
  3. }
  4. type MethodsHeaders = Partial<{
  5. [Key in axios.Method as Lowercase<Key>]: AxiosHeaders;
  6. } & {common: AxiosHeaders}>;
  7. type AxiosHeaderMatcher = string | RegExp | ((this: AxiosHeaders, value: string, name: string) => boolean);
  8. type AxiosHeaderParser = (this: AxiosHeaders, value: axios.AxiosHeaderValue, header: string) => any;
  9. type CommonRequestHeadersList = 'Accept' | 'Content-Length' | 'User-Agent'| 'Content-Encoding' | 'Authorization';
  10. type ContentType = axios.AxiosHeaderValue | 'text/html' | 'text/plain' | 'multipart/form-data' | 'application/json' | 'application/x-www-form-urlencoded' | 'application/octet-stream';
  11. type CommonResponseHeadersList = 'Server' | 'Content-Type' | 'Content-Length' | 'Cache-Control'| 'Content-Encoding';
  12. declare class AxiosHeaders {
  13. constructor(
  14. headers?: RawAxiosHeaders | AxiosHeaders | string
  15. );
  16. [key: string]: any;
  17. set(headerName?: string, value?: axios.AxiosHeaderValue, rewrite?: boolean | AxiosHeaderMatcher): AxiosHeaders;
  18. set(headers?: RawAxiosHeaders | AxiosHeaders | string, rewrite?: boolean): AxiosHeaders;
  19. get(headerName: string, parser: RegExp): RegExpExecArray | null;
  20. get(headerName: string, matcher?: true | AxiosHeaderParser): axios.AxiosHeaderValue;
  21. has(header: string, matcher?: AxiosHeaderMatcher): boolean;
  22. delete(header: string | string[], matcher?: AxiosHeaderMatcher): boolean;
  23. clear(matcher?: AxiosHeaderMatcher): boolean;
  24. normalize(format: boolean): AxiosHeaders;
  25. concat(...targets: Array<AxiosHeaders | RawAxiosHeaders | string | undefined | null>): AxiosHeaders;
  26. toJSON(asStrings?: boolean): RawAxiosHeaders;
  27. static from(thing?: AxiosHeaders | RawAxiosHeaders | string): AxiosHeaders;
  28. static accessor(header: string | string[]): AxiosHeaders;
  29. static concat(...targets: Array<AxiosHeaders | RawAxiosHeaders | string | undefined | null>): AxiosHeaders;
  30. setContentType(value: ContentType, rewrite?: boolean | AxiosHeaderMatcher): AxiosHeaders;
  31. getContentType(parser?: RegExp): RegExpExecArray | null;
  32. getContentType(matcher?: AxiosHeaderMatcher): axios.AxiosHeaderValue;
  33. hasContentType(matcher?: AxiosHeaderMatcher): boolean;
  34. setContentLength(value: axios.AxiosHeaderValue, rewrite?: boolean | AxiosHeaderMatcher): AxiosHeaders;
  35. getContentLength(parser?: RegExp): RegExpExecArray | null;
  36. getContentLength(matcher?: AxiosHeaderMatcher): axios.AxiosHeaderValue;
  37. hasContentLength(matcher?: AxiosHeaderMatcher): boolean;
  38. setAccept(value: axios.AxiosHeaderValue, rewrite?: boolean | AxiosHeaderMatcher): AxiosHeaders;
  39. getAccept(parser?: RegExp): RegExpExecArray | null;
  40. getAccept(matcher?: AxiosHeaderMatcher): axios.AxiosHeaderValue;
  41. hasAccept(matcher?: AxiosHeaderMatcher): boolean;
  42. setUserAgent(value: axios.AxiosHeaderValue, rewrite?: boolean | AxiosHeaderMatcher): AxiosHeaders;
  43. getUserAgent(parser?: RegExp): RegExpExecArray | null;
  44. getUserAgent(matcher?: AxiosHeaderMatcher): axios.AxiosHeaderValue;
  45. hasUserAgent(matcher?: AxiosHeaderMatcher): boolean;
  46. setContentEncoding(value: axios.AxiosHeaderValue, rewrite?: boolean | AxiosHeaderMatcher): AxiosHeaders;
  47. getContentEncoding(parser?: RegExp): RegExpExecArray | null;
  48. getContentEncoding(matcher?: AxiosHeaderMatcher): axios.AxiosHeaderValue;
  49. hasContentEncoding(matcher?: AxiosHeaderMatcher): boolean;
  50. setAuthorization(value: axios.AxiosHeaderValue, rewrite?: boolean | AxiosHeaderMatcher): AxiosHeaders;
  51. getAuthorization(parser?: RegExp): RegExpExecArray | null;
  52. getAuthorization(matcher?: AxiosHeaderMatcher): axios.AxiosHeaderValue;
  53. hasAuthorization(matcher?: AxiosHeaderMatcher): boolean;
  54. getSetCookie(): string[];
  55. [Symbol.iterator](): IterableIterator<[string, axios.AxiosHeaderValue]>;
  56. }
  57. declare class AxiosError<T = unknown, D = any> extends Error {
  58. constructor(
  59. message?: string,
  60. code?: string,
  61. config?: axios.InternalAxiosRequestConfig<D>,
  62. request?: any,
  63. response?: axios.AxiosResponse<T, D>
  64. );
  65. config?: axios.InternalAxiosRequestConfig<D>;
  66. code?: string;
  67. request?: any;
  68. response?: axios.AxiosResponse<T, D>;
  69. isAxiosError: boolean;
  70. status?: number;
  71. toJSON: () => object;
  72. cause?: Error;
  73. static from<T = unknown, D = any>(
  74. error: Error | unknown,
  75. code?: string,
  76. config?: axios.InternalAxiosRequestConfig<D>,
  77. request?: any,
  78. response?: axios.AxiosResponse<T, D>,
  79. customProps?: object,
  80. ): AxiosError<T, D>;
  81. static readonly ERR_FR_TOO_MANY_REDIRECTS = "ERR_FR_TOO_MANY_REDIRECTS";
  82. static readonly ERR_BAD_OPTION_VALUE = "ERR_BAD_OPTION_VALUE";
  83. static readonly ERR_BAD_OPTION = "ERR_BAD_OPTION";
  84. static readonly ERR_NETWORK = "ERR_NETWORK";
  85. static readonly ERR_DEPRECATED = "ERR_DEPRECATED";
  86. static readonly ERR_BAD_RESPONSE = "ERR_BAD_RESPONSE";
  87. static readonly ERR_BAD_REQUEST = "ERR_BAD_REQUEST";
  88. static readonly ERR_NOT_SUPPORT = "ERR_NOT_SUPPORT";
  89. static readonly ERR_INVALID_URL = "ERR_INVALID_URL";
  90. static readonly ERR_CANCELED = "ERR_CANCELED";
  91. static readonly ECONNABORTED = "ECONNABORTED";
  92. static readonly ETIMEDOUT = "ETIMEDOUT";
  93. }
  94. declare class CanceledError<T> extends AxiosError<T> {
  95. }
  96. declare class Axios {
  97. constructor(config?: axios.AxiosRequestConfig);
  98. defaults: axios.AxiosDefaults;
  99. interceptors: {
  100. request: axios.AxiosInterceptorManager<axios.InternalAxiosRequestConfig>;
  101. response: axios.AxiosInterceptorManager<axios.AxiosResponse>;
  102. };
  103. getUri(config?: axios.AxiosRequestConfig): string;
  104. request<T = any, R = axios.AxiosResponse<T>, D = any>(config: axios.AxiosRequestConfig<D>): Promise<R>;
  105. get<T = any, R = axios.AxiosResponse<T>, D = any>(url: string, config?: axios.AxiosRequestConfig<D>): Promise<R>;
  106. delete<T = any, R = axios.AxiosResponse<T>, D = any>(url: string, config?: axios.AxiosRequestConfig<D>): Promise<R>;
  107. head<T = any, R = axios.AxiosResponse<T>, D = any>(url: string, config?: axios.AxiosRequestConfig<D>): Promise<R>;
  108. options<T = any, R = axios.AxiosResponse<T>, D = any>(url: string, config?: axios.AxiosRequestConfig<D>): Promise<R>;
  109. post<T = any, R = axios.AxiosResponse<T>, D = any>(url: string, data?: D, config?: axios.AxiosRequestConfig<D>): Promise<R>;
  110. put<T = any, R = axios.AxiosResponse<T>, D = any>(url: string, data?: D, config?: axios.AxiosRequestConfig<D>): Promise<R>;
  111. patch<T = any, R = axios.AxiosResponse<T>, D = any>(url: string, data?: D, config?: axios.AxiosRequestConfig<D>): Promise<R>;
  112. postForm<T = any, R = axios.AxiosResponse<T>, D = any>(url: string, data?: D, config?: axios.AxiosRequestConfig<D>): Promise<R>;
  113. putForm<T = any, R = axios.AxiosResponse<T>, D = any>(url: string, data?: D, config?: axios.AxiosRequestConfig<D>): Promise<R>;
  114. patchForm<T = any, R = axios.AxiosResponse<T>, D = any>(url: string, data?: D, config?: axios.AxiosRequestConfig<D>): Promise<R>;
  115. }
  116. declare enum HttpStatusCode {
  117. Continue = 100,
  118. SwitchingProtocols = 101,
  119. Processing = 102,
  120. EarlyHints = 103,
  121. Ok = 200,
  122. Created = 201,
  123. Accepted = 202,
  124. NonAuthoritativeInformation = 203,
  125. NoContent = 204,
  126. ResetContent = 205,
  127. PartialContent = 206,
  128. MultiStatus = 207,
  129. AlreadyReported = 208,
  130. ImUsed = 226,
  131. MultipleChoices = 300,
  132. MovedPermanently = 301,
  133. Found = 302,
  134. SeeOther = 303,
  135. NotModified = 304,
  136. UseProxy = 305,
  137. Unused = 306,
  138. TemporaryRedirect = 307,
  139. PermanentRedirect = 308,
  140. BadRequest = 400,
  141. Unauthorized = 401,
  142. PaymentRequired = 402,
  143. Forbidden = 403,
  144. NotFound = 404,
  145. MethodNotAllowed = 405,
  146. NotAcceptable = 406,
  147. ProxyAuthenticationRequired = 407,
  148. RequestTimeout = 408,
  149. Conflict = 409,
  150. Gone = 410,
  151. LengthRequired = 411,
  152. PreconditionFailed = 412,
  153. PayloadTooLarge = 413,
  154. UriTooLong = 414,
  155. UnsupportedMediaType = 415,
  156. RangeNotSatisfiable = 416,
  157. ExpectationFailed = 417,
  158. ImATeapot = 418,
  159. MisdirectedRequest = 421,
  160. UnprocessableEntity = 422,
  161. Locked = 423,
  162. FailedDependency = 424,
  163. TooEarly = 425,
  164. UpgradeRequired = 426,
  165. PreconditionRequired = 428,
  166. TooManyRequests = 429,
  167. RequestHeaderFieldsTooLarge = 431,
  168. UnavailableForLegalReasons = 451,
  169. InternalServerError = 500,
  170. NotImplemented = 501,
  171. BadGateway = 502,
  172. ServiceUnavailable = 503,
  173. GatewayTimeout = 504,
  174. HttpVersionNotSupported = 505,
  175. VariantAlsoNegotiates = 506,
  176. InsufficientStorage = 507,
  177. LoopDetected = 508,
  178. NotExtended = 510,
  179. NetworkAuthenticationRequired = 511,
  180. }
  181. type InternalAxiosError<T = unknown, D = any> = AxiosError<T, D>;
  182. declare namespace axios {
  183. type AxiosError<T = unknown, D = any> = InternalAxiosError<T, D>;
  184. type RawAxiosRequestHeaders = Partial<RawAxiosHeaders & {
  185. [Key in CommonRequestHeadersList]: AxiosHeaderValue;
  186. } & {
  187. 'Content-Type': ContentType
  188. }>;
  189. type AxiosRequestHeaders = RawAxiosRequestHeaders & AxiosHeaders;
  190. type AxiosHeaderValue = AxiosHeaders | string | string[] | number | boolean | null;
  191. type RawCommonResponseHeaders = {
  192. [Key in CommonResponseHeadersList]: AxiosHeaderValue;
  193. } & {
  194. "set-cookie": string[];
  195. };
  196. type RawAxiosResponseHeaders = Partial<RawAxiosHeaders & RawCommonResponseHeaders>;
  197. type AxiosResponseHeaders = RawAxiosResponseHeaders & AxiosHeaders;
  198. interface AxiosRequestTransformer {
  199. (this: InternalAxiosRequestConfig, data: any, headers: AxiosRequestHeaders): any;
  200. }
  201. interface AxiosResponseTransformer {
  202. (this: InternalAxiosRequestConfig, data: any, headers: AxiosResponseHeaders, status?: number): any;
  203. }
  204. interface AxiosAdapter {
  205. (config: InternalAxiosRequestConfig): AxiosPromise;
  206. }
  207. interface AxiosBasicCredentials {
  208. username: string;
  209. password: string;
  210. }
  211. interface AxiosProxyConfig {
  212. host: string;
  213. port: number;
  214. auth?: AxiosBasicCredentials;
  215. protocol?: string;
  216. }
  217. type Method =
  218. | 'get' | 'GET'
  219. | 'delete' | 'DELETE'
  220. | 'head' | 'HEAD'
  221. | 'options' | 'OPTIONS'
  222. | 'post' | 'POST'
  223. | 'put' | 'PUT'
  224. | 'patch' | 'PATCH'
  225. | 'purge' | 'PURGE'
  226. | 'link' | 'LINK'
  227. | 'unlink' | 'UNLINK';
  228. type ResponseType =
  229. | 'arraybuffer'
  230. | 'blob'
  231. | 'document'
  232. | 'json'
  233. | 'text'
  234. | 'stream'
  235. | 'formdata';
  236. type responseEncoding =
  237. | 'ascii' | 'ASCII'
  238. | 'ansi' | 'ANSI'
  239. | 'binary' | 'BINARY'
  240. | 'base64' | 'BASE64'
  241. | 'base64url' | 'BASE64URL'
  242. | 'hex' | 'HEX'
  243. | 'latin1' | 'LATIN1'
  244. | 'ucs-2' | 'UCS-2'
  245. | 'ucs2' | 'UCS2'
  246. | 'utf-8' | 'UTF-8'
  247. | 'utf8' | 'UTF8'
  248. | 'utf16le' | 'UTF16LE';
  249. interface TransitionalOptions {
  250. silentJSONParsing?: boolean;
  251. forcedJSONParsing?: boolean;
  252. clarifyTimeoutError?: boolean;
  253. }
  254. interface GenericAbortSignal {
  255. readonly aborted: boolean;
  256. onabort?: ((...args: any) => any) | null;
  257. addEventListener?: (...args: any) => any;
  258. removeEventListener?: (...args: any) => any;
  259. }
  260. interface FormDataVisitorHelpers {
  261. defaultVisitor: SerializerVisitor;
  262. convertValue: (value: any) => any;
  263. isVisitable: (value: any) => boolean;
  264. }
  265. interface SerializerVisitor {
  266. (
  267. this: GenericFormData,
  268. value: any,
  269. key: string | number,
  270. path: null | Array<string | number>,
  271. helpers: FormDataVisitorHelpers
  272. ): boolean;
  273. }
  274. interface SerializerOptions {
  275. visitor?: SerializerVisitor;
  276. dots?: boolean;
  277. metaTokens?: boolean;
  278. indexes?: boolean | null;
  279. }
  280. // tslint:disable-next-line
  281. interface FormSerializerOptions extends SerializerOptions {
  282. }
  283. interface ParamEncoder {
  284. (value: any, defaultEncoder: (value: any) => any): any;
  285. }
  286. interface CustomParamsSerializer {
  287. (params: Record<string, any>, options?: ParamsSerializerOptions): string;
  288. }
  289. interface ParamsSerializerOptions extends SerializerOptions {
  290. encode?: ParamEncoder;
  291. serialize?: CustomParamsSerializer;
  292. }
  293. type MaxUploadRate = number;
  294. type MaxDownloadRate = number;
  295. type BrowserProgressEvent = any;
  296. interface AxiosProgressEvent {
  297. loaded: number;
  298. total?: number;
  299. progress?: number;
  300. bytes: number;
  301. rate?: number;
  302. estimated?: number;
  303. upload?: boolean;
  304. download?: boolean;
  305. event?: BrowserProgressEvent;
  306. lengthComputable: boolean;
  307. }
  308. type Milliseconds = number;
  309. type AxiosAdapterName = 'fetch' | 'xhr' | 'http' | (string & {});
  310. type AxiosAdapterConfig = AxiosAdapter | AxiosAdapterName;
  311. type AddressFamily = 4 | 6 | undefined;
  312. interface LookupAddressEntry {
  313. address: string;
  314. family?: AddressFamily;
  315. }
  316. type LookupAddress = string | LookupAddressEntry;
  317. interface AxiosRequestConfig<D = any> {
  318. url?: string;
  319. method?: Method | string;
  320. baseURL?: string;
  321. allowAbsoluteUrls?: boolean;
  322. transformRequest?: AxiosRequestTransformer | AxiosRequestTransformer[];
  323. transformResponse?: AxiosResponseTransformer | AxiosResponseTransformer[];
  324. headers?: (RawAxiosRequestHeaders & MethodsHeaders) | AxiosHeaders;
  325. params?: any;
  326. paramsSerializer?: ParamsSerializerOptions | CustomParamsSerializer;
  327. data?: D;
  328. timeout?: Milliseconds;
  329. timeoutErrorMessage?: string;
  330. withCredentials?: boolean;
  331. adapter?: AxiosAdapterConfig | AxiosAdapterConfig[];
  332. auth?: AxiosBasicCredentials;
  333. responseType?: ResponseType;
  334. responseEncoding?: responseEncoding | string;
  335. xsrfCookieName?: string;
  336. xsrfHeaderName?: string;
  337. onUploadProgress?: (progressEvent: AxiosProgressEvent) => void;
  338. onDownloadProgress?: (progressEvent: AxiosProgressEvent) => void;
  339. maxContentLength?: number;
  340. validateStatus?: ((status: number) => boolean) | null;
  341. maxBodyLength?: number;
  342. maxRedirects?: number;
  343. maxRate?: number | [MaxUploadRate, MaxDownloadRate];
  344. beforeRedirect?: (options: Record<string, any>, responseDetails: {headers: Record<string, string>, statusCode: HttpStatusCode}) => void;
  345. socketPath?: string | null;
  346. transport?: any;
  347. httpAgent?: any;
  348. httpsAgent?: any;
  349. proxy?: AxiosProxyConfig | false;
  350. cancelToken?: CancelToken;
  351. decompress?: boolean;
  352. transitional?: TransitionalOptions;
  353. signal?: GenericAbortSignal;
  354. insecureHTTPParser?: boolean;
  355. env?: {
  356. FormData?: new (...args: any[]) => object;
  357. };
  358. formSerializer?: FormSerializerOptions;
  359. family?: AddressFamily;
  360. lookup?: ((hostname: string, options: object, cb: (err: Error | null, address: LookupAddress | LookupAddress[], family?: AddressFamily) => void) => void) |
  361. ((hostname: string, options: object) => Promise<[address: LookupAddressEntry | LookupAddressEntry[], family?: AddressFamily] | LookupAddress>);
  362. withXSRFToken?: boolean | ((config: InternalAxiosRequestConfig) => boolean | undefined);
  363. fetchOptions?: Omit<RequestInit, 'body' | 'headers' | 'method' | 'signal'> | Record<string, any>;
  364. }
  365. // Alias
  366. type RawAxiosRequestConfig<D = any> = AxiosRequestConfig<D>;
  367. interface InternalAxiosRequestConfig<D = any> extends AxiosRequestConfig<D> {
  368. headers: AxiosRequestHeaders;
  369. }
  370. interface HeadersDefaults {
  371. common: RawAxiosRequestHeaders;
  372. delete: RawAxiosRequestHeaders;
  373. get: RawAxiosRequestHeaders;
  374. head: RawAxiosRequestHeaders;
  375. post: RawAxiosRequestHeaders;
  376. put: RawAxiosRequestHeaders;
  377. patch: RawAxiosRequestHeaders;
  378. options?: RawAxiosRequestHeaders;
  379. purge?: RawAxiosRequestHeaders;
  380. link?: RawAxiosRequestHeaders;
  381. unlink?: RawAxiosRequestHeaders;
  382. }
  383. interface AxiosDefaults<D = any> extends Omit<AxiosRequestConfig<D>, 'headers'> {
  384. headers: HeadersDefaults;
  385. }
  386. interface CreateAxiosDefaults<D = any> extends Omit<AxiosRequestConfig<D>, 'headers'> {
  387. headers?: RawAxiosRequestHeaders | AxiosHeaders | Partial<HeadersDefaults>;
  388. }
  389. interface AxiosResponse<T = any, D = any> {
  390. data: T;
  391. status: number;
  392. statusText: string;
  393. headers: RawAxiosResponseHeaders | AxiosResponseHeaders;
  394. config: InternalAxiosRequestConfig<D>;
  395. request?: any;
  396. }
  397. type AxiosPromise<T = any> = Promise<AxiosResponse<T>>;
  398. interface CancelStatic {
  399. new (message?: string): Cancel;
  400. }
  401. interface Cancel {
  402. message: string | undefined;
  403. }
  404. interface Canceler {
  405. (message?: string, config?: AxiosRequestConfig, request?: any): void;
  406. }
  407. interface CancelTokenStatic {
  408. new (executor: (cancel: Canceler) => void): CancelToken;
  409. source(): CancelTokenSource;
  410. }
  411. interface CancelToken {
  412. promise: Promise<Cancel>;
  413. reason?: Cancel;
  414. throwIfRequested(): void;
  415. }
  416. interface CancelTokenSource {
  417. token: CancelToken;
  418. cancel: Canceler;
  419. }
  420. interface AxiosInterceptorOptions {
  421. synchronous?: boolean;
  422. runWhen?: (config: InternalAxiosRequestConfig) => boolean;
  423. }
  424. type AxiosRequestInterceptorUse<T> = (onFulfilled?: ((value: T) => T | Promise<T>) | null, onRejected?: ((error: any) => any) | null, options?: AxiosInterceptorOptions) => number;
  425. type AxiosResponseInterceptorUse<T> = (onFulfilled?: ((value: T) => T | Promise<T>) | null, onRejected?: ((error: any) => any) | null) => number;
  426. interface AxiosInterceptorManager<V> {
  427. use: V extends AxiosResponse ? AxiosResponseInterceptorUse<V> : AxiosRequestInterceptorUse<V>;
  428. eject(id: number): void;
  429. clear(): void;
  430. }
  431. interface AxiosInstance extends Axios {
  432. <T = any, R = AxiosResponse<T>, D = any>(config: AxiosRequestConfig<D>): Promise<R>;
  433. <T = any, R = AxiosResponse<T>, D = any>(url: string, config?: AxiosRequestConfig<D>): Promise<R>;
  434. create(config?: CreateAxiosDefaults): AxiosInstance;
  435. defaults: Omit<AxiosDefaults, 'headers'> & {
  436. headers: HeadersDefaults & {
  437. [key: string]: AxiosHeaderValue
  438. }
  439. };
  440. }
  441. interface GenericFormData {
  442. append(name: string, value: any, options?: any): any;
  443. }
  444. interface GenericHTMLFormElement {
  445. name: string;
  446. method: string;
  447. submit(): void;
  448. }
  449. interface AxiosStatic extends AxiosInstance {
  450. Cancel: CancelStatic;
  451. CancelToken: CancelTokenStatic;
  452. Axios: typeof Axios;
  453. AxiosError: typeof AxiosError;
  454. CanceledError: typeof CanceledError;
  455. HttpStatusCode: typeof HttpStatusCode;
  456. readonly VERSION: string;
  457. isCancel(value: any): value is Cancel;
  458. all<T>(values: Array<T | Promise<T>>): Promise<T[]>;
  459. spread<T, R>(callback: (...args: T[]) => R): (array: T[]) => R;
  460. isAxiosError<T = any, D = any>(payload: any): payload is AxiosError<T, D>;
  461. toFormData(sourceObj: object, targetFormData?: GenericFormData, options?: FormSerializerOptions): GenericFormData;
  462. formToJSON(form: GenericFormData|GenericHTMLFormElement): object;
  463. getAdapter(adapters: AxiosAdapterConfig | AxiosAdapterConfig[] | undefined): AxiosAdapter;
  464. AxiosHeaders: typeof AxiosHeaders;
  465. mergeConfig<D = any>(config1: AxiosRequestConfig<D>, config2: AxiosRequestConfig<D>): AxiosRequestConfig<D>;
  466. }
  467. }
  468. declare const axios: axios.AxiosStatic;
  469. export = axios;