diff --git a/packages/vue-app/types/index.d.ts b/packages/vue-app/types/index.d.ts index 96b908efde..0d7c0f5607 100644 --- a/packages/vue-app/types/index.d.ts +++ b/packages/vue-app/types/index.d.ts @@ -9,6 +9,9 @@ import './process' // augment typings of Vue.js import './vue' +// augment typings of Vuex +import './vuex' + type Dictionary = { [key: string]: T } type NuxtState = Dictionary diff --git a/packages/vue-app/types/vuex.d.ts b/packages/vue-app/types/vuex.d.ts new file mode 100644 index 0000000000..8493a38515 --- /dev/null +++ b/packages/vue-app/types/vuex.d.ts @@ -0,0 +1,10 @@ +import Store from 'vuex' +import VueRouter from 'vue-router' +import { NuxtAppOptions } from '.' + +declare module 'vuex/types/index' { + interface Store { + app: NuxtAppOptions + $router: VueRouter + } +}