import Vue from "vue"; import Vuex, { StoreOptions } from "vuex"; Vue.use(Vuex); export interface AppState { in_room: boolean; room: string; playerName: string; } const store: StoreOptions = { state: { in_room: false, room: "", playerName: "webclient-" + Math.random() .toString(32) .slice(2) } }; export default new Vuex.Store(store);