diff --git a/index.d.ts b/index.d.ts index 27c3361..356508c 100644 --- a/index.d.ts +++ b/index.d.ts @@ -81,7 +81,7 @@ export interface AxiosRequestConfig { signal?: AbortSignal; } -export interface AxiosResponse { +export interface AxiosResponse { data: T; status: number; statusText: string; @@ -90,7 +90,7 @@ export interface AxiosResponse { request?: any; } -export interface AxiosError extends Error { +export interface AxiosError extends Error { config: AxiosRequestConfig; code?: string; request?: any; @@ -99,7 +99,7 @@ export interface AxiosError extends Error { toJSON: () => object; } -export interface AxiosPromise extends Promise> { +export interface AxiosPromise extends Promise> { } export interface CancelStatic { @@ -143,14 +143,14 @@ export class Axios { response: AxiosInterceptorManager; }; getUri(config?: AxiosRequestConfig): string; - request, D = any> (config: AxiosRequestConfig): Promise; - get, D = any>(url: string, config?: AxiosRequestConfig): Promise; - delete, D = any>(url: string, config?: AxiosRequestConfig): Promise; - head, D = any>(url: string, config?: AxiosRequestConfig): Promise; - options, D = any>(url: string, config?: AxiosRequestConfig): Promise; - post, D = any>(url: string, data?: D, config?: AxiosRequestConfig): Promise; - put, D = any>(url: string, data?: D, config?: AxiosRequestConfig): Promise; - patch, D = any>(url: string, data?: D, config?: AxiosRequestConfig): Promise; + request, D = any> (config: AxiosRequestConfig): Promise; + get, D = any>(url: string, config?: AxiosRequestConfig): Promise; + delete, D = any>(url: string, config?: AxiosRequestConfig): Promise; + head, D = any>(url: string, config?: AxiosRequestConfig): Promise; + options, D = any>(url: string, config?: AxiosRequestConfig): Promise; + post, D = any>(url: string, data?: D, config?: AxiosRequestConfig): Promise; + put, D = any>(url: string, data?: D, config?: AxiosRequestConfig): Promise; + patch, D = any>(url: string, data?: D, config?: AxiosRequestConfig): Promise; } export interface AxiosInstance extends Axios {