File tree 1 file changed +10
-1
lines changed
1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change 1
- import { AxiosInstance , AxiosRequestConfig } from 'axios'
1
+ import { AxiosInstance , AxiosRequestConfig , AxiosResponse } from 'axios'
2
2
import Vue from 'vue'
3
3
4
4
interface NuxtAxiosInstance extends AxiosInstance {
@@ -10,6 +10,15 @@ interface NuxtAxiosInstance extends AxiosInstance {
10
10
$post < T = any > ( url : string , data ?: any , config ?: AxiosRequestConfig ) : Promise < T >
11
11
$put < T = any > ( url : string , data ?: any , config ?: AxiosRequestConfig ) : Promise < T >
12
12
$patch < T = any > ( url : string , data ?: any , config ?: AxiosRequestConfig ) : Promise < T >
13
+
14
+ setHeader ( name : string , value ?: string | false , scopes ?: string | string [ ] ) : void ;
15
+ setToken ( token : string | false , type ?: string , scopes ?: string | string [ ] ) : void ;
16
+
17
+ onRequest ( callback : ( config : AxiosRequestConfig ) => void ) : void ;
18
+ onResponse < T = any > ( callback : ( response : AxiosResponse < T > ) => void ) : void ;
19
+ onError ( callback : ( error : AxiosError ) => void ) : void ;
20
+ onRequestError ( callback : ( error : AxiosError ) => void ) : void ;
21
+ onResponseErro ( callback : ( error : AxiosError ) => void ) : void ;
13
22
}
14
23
15
24
declare module 'vue/types/vue' {
You can’t perform that action at this time.
0 commit comments