feat(types): add Context interface

master
mvrlin 2019-02-10 08:58:54 +03:00 committed by Pooya Parsa
parent 92edc6ab1d
commit 7f8952aa08
1 changed files with 6 additions and 0 deletions

6
types/index.d.ts vendored
View File

@ -21,6 +21,12 @@ interface NuxtAxiosInstance extends AxiosInstance {
onResponseError(callback: (error: AxiosError) => void): void
}
declare module '@nuxt/vue-app' {
interface Context {
$axios: NuxtAxiosInstance
}
}
declare module 'vue/types/vue' {
interface Vue {
$axios: NuxtAxiosInstance