import { Store , StoreOptions } from 'vuex' ; import { Module } from './module' ; export { Getters , Mutations , Actions , inject } from './assets' ; export { Dispatch , Commit , Context } from './context' ; export { registerModule , unregisterModule } from './register' ; export { createMapper } from './mapper' ; export { createComposable } from './composables' ; export { hotUpdate } from './module' ; export { Module } ; export function createStore ( rootModule , options = { } ) { const { options : rootModuleOptions , injectStore } = rootModule . create ( [ ] , '' ) ; const store = new Store ( { ... rootModuleOptions , ... options , modules : { ... rootModuleOptions . modules , ... options . modules , } , plugins : [ injectStore ] . concat ( options . plugins || [ ] ) , } ) ; return store ; }