2
0
mirror of https://github.com/tenrok/axios.git synced 2026-06-20 20:00:40 +03:00

chore(types): move AxiosStatic#create to AxiosInstance#create (#5096)

* Add the bad test case.

* Fix and pass the test

* Update index.d.cts

---------

Co-authored-by: Jay <jasonsaayman@gmail.com>
This commit is contained in:
George Cheng
2025-03-31 12:00:51 -07:00
committed by GitHub
parent 5a9134e099
commit d1178cad4c
3 changed files with 3 additions and 3 deletions
Vendored
+1 -1
View File
@@ -514,6 +514,7 @@ export interface AxiosInstance extends Axios {
<T = any, R = AxiosResponse<T>, D = any>(config: AxiosRequestConfig<D>): Promise<R>;
<T = any, R = AxiosResponse<T>, D = any>(url: string, config?: AxiosRequestConfig<D>): Promise<R>;
create(config?: CreateAxiosDefaults): AxiosInstance;
defaults: Omit<AxiosDefaults, 'headers'> & {
headers: HeadersDefaults & {
[key: string]: AxiosHeaderValue
@@ -548,7 +549,6 @@ export function all<T>(values: Array<T | Promise<T>>): Promise<T[]>;
export function mergeConfig<D = any>(config1: AxiosRequestConfig<D>, config2: AxiosRequestConfig<D>): AxiosRequestConfig<D>;
export interface AxiosStatic extends AxiosInstance {
create(config?: CreateAxiosDefaults): AxiosInstance;
Cancel: CancelStatic;
CancelToken: CancelTokenStatic;
Axios: typeof Axios;