flaschengeist-frontend/src/store/index.ts

29 lines
661 B
TypeScript
Raw Normal View History

2020-10-02 07:13:14 +00:00
import { store } from 'quasar/wrappers';
import { SessionInterface } from 'src/plugins/user/store/session';
2020-10-02 07:13:14 +00:00
import Vuex from 'vuex';
import { UserStateInterface } from 'src/plugins/user/store/user';
2020-10-02 07:13:14 +00:00
/*
* If not building with SSR mode, you can
* directly export the Store instantiation
*/
export interface StateInterface {
2020-10-30 08:57:39 +00:00
user: UserStateInterface;
session: SessionInterface;
[key: string]: any;
2020-10-02 07:13:14 +00:00
}
export default store(function ({ Vue }) {
2020-10-02 07:13:14 +00:00
Vue.use(Vuex);
const Store = new Vuex.Store<StateInterface>({
2020-10-16 07:38:14 +00:00
modules: {},
2020-10-02 07:13:14 +00:00
// enable strict mode (adds overhead!)
// for dev mode only
strict: !!process.env.DEV,
2020-10-02 07:13:14 +00:00
});
return Store;
});