29 lines
659 B
TypeScript
29 lines
659 B
TypeScript
import { store } from 'quasar/wrappers';
|
|
import { SessionInterface } from 'src/plugins/user/store/session';
|
|
import Vuex from 'vuex';
|
|
import { UserStateInterface } from 'src/plugins/user/store/user';
|
|
|
|
/*
|
|
* If not building with SSR mode, you can
|
|
* directly export the Store instantiation
|
|
*/
|
|
export interface StateInterface {
|
|
user: UserStateInterface;
|
|
session: SessionInterface;
|
|
[key: string]: any;
|
|
}
|
|
|
|
export default store(function({ Vue }) {
|
|
Vue.use(Vuex);
|
|
|
|
const Store = new Vuex.Store<StateInterface>({
|
|
modules: {},
|
|
|
|
// enable strict mode (adds overhead!)
|
|
// for dev mode only
|
|
strict: !!process.env.DEV
|
|
});
|
|
|
|
return Store;
|
|
});
|