import { MutationTree , ActionTree , Module , GetterTree } from 'vuex' ; import { State as RootState } from '../index' ; import { namespaced , register as commonRegister , State as CommonState , state as commonState , mutations as commonMutations , actions as commonActions , webActions , ipcActions , getters as commonGetters , } from '@/stores/modules/translation' ; import { languages } from '@/stores/getters' ; import { moduleHelper } from '@/stores' ; export const register = { ... commonRegister , } ; const state = { ... commonState , items : [ ] , } ; const mutations = { ... commonMutations , } ; const actions = { ... ( TARGET_BROWSER === 'web' ? webActions : ipcActions ) , ... commonActions , init : ( ) => { } , } ; const getters = { ... commonGetters , languages , } ; export const translation = { namespaced , state , actions , mutations , getters , } ; export default moduleHelper ( translation , register ) ; type C = DefaultConfig ; interface State extends CommonState { items : sourceId [ ] ; }