flaschengeist-frontend/src/store/index.ts

32 lines
651 B
TypeScript

import { store } from 'quasar/wrappers';
import Vuex from 'vuex';
import user from './module-user';
import { UserStateInterface } from './module-user/state';
/*
* If not building with SSR mode, you can
* directly export the Store instantiation
*/
export interface StateInterface {
// Define your own store structure, using submodules if needed
user: UserStateInterface;
}
export default store(function ({ Vue }) {
Vue.use(Vuex);
const Store = new Vuex.Store<StateInterface>({
modules: {
user
},
// enable strict mode (adds overhead!)
// for dev mode only
strict: !!process.env.DEV
});
return Store;
});