import Vue from 'vue';
import { Store } from 'vuex';
import { ALL_CONSTANT } from '~/plugins/constants';

type ConstantMap<T = typeof ALL_CONSTANT> = {
  [K in keyof T]: T[K];
};

declare module 'vue/types/vue' {
  interface Vue {
    readonly $constants: ConstantMap;
  }
}

declare module 'vuex/types' {
  interface Store {
    readonly $constants: ConstantMap;
  }
}
