import { GetterTree } from 'vuex'
import { State } from './index'
import { RootState } from '~/store/index'

export type Getters<S = State> = {
  defs(state: S, key: string): any
}

export const getters: GetterTree<State, RootState> & Getters = {
  defs: (state, key: string) => {
    return state.main.get(key)
  },
}
