From 18f02c3e8bd820db767197272336a63f4b55c8ca Mon Sep 17 00:00:00 2001 From: Farnabaz Date: Wed, 3 Feb 2021 17:02:42 +0330 Subject: [PATCH] fix(types): update interceptors type --- types/index.d.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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 }