3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-03-18 06:51:51 +00:00
zeppelin/dashboard/src/store/index.ts

33 lines
679 B
TypeScript
Raw Normal View History

import Vue from "vue";
import Vuex, { Store } from "vuex";
Vue.use(Vuex);
import { RootState } from "./types";
import { AuthStore } from "./auth";
import { GuildStore } from "./guilds";
2019-08-22 01:22:26 +03:00
import { DocsStore } from "./docs";
export const RootStore = new Vuex.Store<RootState>({
modules: {
auth: AuthStore,
guilds: GuildStore,
2019-08-22 01:22:26 +03:00
docs: DocsStore,
},
});
// Set up typings so Vue/our components know about the state's types
declare module "vue/types/options" {
interface ComponentOptions<V extends Vue> {
2019-08-22 01:22:26 +03:00
// @ts-ignore
store?: Store<RootState>;
}
}
declare module "vue/types/vue" {
interface Vue {
2019-08-22 01:22:26 +03:00
// @ts-ignore
$store: Store<RootState>;
}
}