message: Export main Vuex store definition as object
  This way TSMM can easily overwrite parts of the store without having to
  duplicate the whole definition.
  Refs
diff: import Vue from 'vue';
  -import Vuex from 'vuex';
  +import Vuex, { ActionContext } from 'vuex';
  import ModalsModule from './modules/ModalsModule';
  import { FolderMigration } from '../migrations/FolderMigration';
  +import ManifestV2 from '../model/ManifestV2';
  +import ThunderstoreMod from '../model/ThunderstoreMod';
  import ThunderstorePackages from '../r2mm/data/ThunderstorePackages';
  // import example from './module-example'
  Vue.use(Vuex);
  +export interface State {
  + apiConnectionError: string;
  + deprecatedMods: Map<string, boolean>;
  + dismissedUpdateAll: boolean;
  + isMigrationChecked: boolean;
  + localModList: ManifestV2[];
  + thunderstoreModList: ThunderstoreMod[];
  +}
  +
  +type Context = ActionContext<State, State>;
  +
  /*
  * If not building with SSR mode, you can
  * directly export the Store instantiation
  */
  -export default function(/* { ssrContext } */) {
  - const Store = new Vuex.Store({
  +export const store = {
  state: {
  localModList: [],
  thunderstoreModList: [],
  @@ -25,20 +37,20 @@ export default function(/* { ssrContext } */) {
  deprecatedMods: new Map<string, boolean>(),
  },
  actions: {
  - updateModList({ commit }, modList) {
  + updateModList({ commit }: Context, modList: ManifestV2[]) {
  commit('setLocalModList', modList);
  },
  - updateThunderstoreModList({ commit }, modList) {
  + updateThunderstoreModList({ commit }: Context, modList: ThunderstoreMod[]) {
  commit('setThunderstoreModList', modList);
  commit('setDeprecatedMods', modList);
  },
  - dismissUpdateAll({commit}) {
  + dismissUpdateAll({commit}: Context) {
  commit('dismissUpdateAll');
  },
  - updateApiConnectionError({commit}, err) {
  + updateApiConnectionError({commit}: Context, err: string) {
  commit('setApiConnectionError', err);
  },
  - async checkMigrations({commit, state}) {
  + async checkMigrations({commit, state}: Context) {
  if (state.isMigrationChecked) {
  return;
  }
  @@ -53,33 +65,37 @@ export default function(/* { ssrContext } */) {
  }
  },
  mutations: {
  - setLocalModList(state, list) {
  + setLocalModList(state: State, list: ManifestV2[]) {
  state.localModList = list;
  },
  - setThunderstoreModList(state, list) {
  + setThunderstoreModList(state: State, list: ThunderstoreMod[]) {
  state.thunderstoreModList = list;
  },
  - dismissUpdateAll(state) {
  + dismissUpdateAll(state: State) {
  state.dismissedUpdateAll = true;
  },
  - setMigrationChecked(state) {
  + setMigrationChecked(state: State) {
  state.isMigrationChecked = true;
  },
  - setApiConnectionError(state, err) {
  + setApiConnectionError(state: State, err: string) {
  state.apiConnectionError = err;
  },
  - setDeprecatedMods(state, err) {
  + setDeprecatedMods(state: State) {
  state.deprecatedMods = ThunderstorePackages.getDeprecatedPackageMap();
  }
  },
  modules: {
  - modals: ModalsModule,
  + modals: ModalsModule
  },
  // enable strict mode (adds overhead!)
  // for dev mode only
  strict: process.env.DEV === 'true'
  - });
  +};
  - return Store;
  -}
  +/*
  + * If not building with SSR mode, you can
  + * directly export the Store instantiation
  + */
  +
  +export default (/* { ssrContext } */) => new Vuex.Store<State>(store);
  