File tree Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Original file line number Diff line number Diff line change
1
+ import { AxiosInstance , AxiosRequestConfig , AxiosPromise } from 'axios'
2
+ import Vue from 'vue'
3
+
4
+ interface NuxtAxiosInstance extends AxiosInstance {
5
+ $request < T = any > ( config : AxiosRequestConfig ) : AxiosPromise < T >
6
+ $get < T = any > ( url : string , config ?: AxiosRequestConfig ) : AxiosPromise < T >
7
+ $delete < T = any > ( url : string , config ?: AxiosRequestConfig ) : AxiosPromise < T >
8
+ $head < T = any > ( url : string , config ?: AxiosRequestConfig ) : AxiosPromise < T >
9
+ $options < T = any > ( url : string , config ?: AxiosRequestConfig ) : AxiosPromise < T >
10
+ $post < T = any > ( url : string , data ?: any , config ?: AxiosRequestConfig ) : AxiosPromise < T >
11
+ $put < T = any > ( url : string , data ?: any , config ?: AxiosRequestConfig ) : AxiosPromise < T >
12
+ $patch < T = any > ( url : string , data ?: any , config ?: AxiosRequestConfig ) : AxiosPromise < T >
13
+ }
14
+
15
+ declare module 'vue/types/vue' {
16
+ interface Vue {
17
+ $axios : NuxtAxiosInstance
18
+ }
19
+ }
Original file line number Diff line number Diff line change 4
4
"description" : " Secure and easy axios integration with Nuxt.js" ,
5
5
"license" : " MIT" ,
6
6
"main" : " lib/module.js" ,
7
+ "types" : " index.d.ts" ,
7
8
"repository" : " https://github.com/nuxt-community/axios-module" ,
8
9
"publishConfig" : {
9
10
"access" : " public"
You can’t perform that action at this time.
0 commit comments