diff --git a/types/index.d.ts b/types/index.d.ts index 3b4f830..fa6793f 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -17,11 +17,11 @@ interface NuxtAxiosInstance extends AxiosStatic { setHeader(name: string, value?: string | false, scopes?: string | string[]): void setToken(token: string | false, type?: string, scopes?: string | string[]): void - onRequest(callback: (config: AxiosRequestConfig) => void): void - onResponse(callback: (response: AxiosResponse) => void): void - onError(callback: (error: AxiosError) => void): void - onRequestError(callback: (error: AxiosError) => void): void - onResponseError(callback: (error: AxiosError) => void): void + onRequest(callback: (config: AxiosRequestConfig) => void | AxiosRequestConfig | Promise): void + onResponse(callback: (response: AxiosResponse) => void | AxiosResponse | Promise> ): void + onError(callback: (error: AxiosError) => any): void + onRequestError(callback: (error: AxiosError) => any): void + onResponseError(callback: (error: AxiosError) => any): void create(options?: AxiosRequestConfig): NuxtAxiosInstance }