Skip to content

Commit 1ed6e2f

Browse files
RomainLanzpi0
authored andcommitted
fix(types): correct Vuex Store instance (nuxt-community#227)
1 parent df6ce84 commit 1ed6e2f

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

types/index.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { AxiosError, AxiosInstance, AxiosRequestConfig, AxiosResponse } from 'axios'
22
import Vue from 'vue'
3+
import './vuex'
34

45
interface NuxtAxiosInstance extends AxiosInstance {
56
$request<T = any>(config: AxiosRequestConfig): Promise<T>

types/vuex.d.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import { NuxtAxiosInstance } from '.'
2+
3+
declare module 'vuex' {
4+
interface Store<S> {
5+
$axios: NuxtAxiosInstance,
6+
}
7+
}

0 commit comments

Comments
 (0)