feat(types): add vuex definition (#5946)

This commit is contained in:
orblazer 2019-06-24 18:56:54 +02:00 committed by Pooya Parsa
parent 86d4613d9c
commit 1b634779f8
2 changed files with 13 additions and 0 deletions

View File

@ -9,6 +9,9 @@ import './process'
// augment typings of Vue.js
import './vue'
// augment typings of Vuex
import './vuex'
type Dictionary<T> = { [key: string]: T }
type NuxtState = Dictionary<any>

10
packages/vue-app/types/vuex.d.ts vendored Normal file
View File

@ -0,0 +1,10 @@
import Store from 'vuex'
import VueRouter from 'vue-router'
import { NuxtAppOptions } from '.'
declare module 'vuex/types/index' {
interface Store<S> {
app: NuxtAppOptions
$router: VueRouter
}
}