Skip to content

Commit

Permalink
fix(types): update interceptors type
Browse files Browse the repository at this point in the history
  • Loading branch information
farnabaz committed Feb 3, 2021
1 parent 62f17ca commit 18f02c3
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<T = any>(callback: (response: AxiosResponse<T>) => 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<AxiosRequestConfig>): void
onResponse<T = any>(callback: (response: AxiosResponse<T>) => void | AxiosResponse<T> | Promise<AxiosResponse<T>> ): void
onError(callback: (error: AxiosError) => any): void
onRequestError(callback: (error: AxiosError) => any): void
onResponseError(callback: (error: AxiosError) => any): void

create(options?: AxiosRequestConfig): NuxtAxiosInstance
}
Expand Down

0 comments on commit 18f02c3

Please sign in to comment.