Skip to content

Commit e5747eb

Browse files
RomainLanzpi0
authored andcommitted
fix(types): correct Vuex Store instance (#227)
1 parent 56df825 commit e5747eb

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

Diff for: types/index.d.ts

+1
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>

Diff for: types/vuex.d.ts

+7
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)