我无法解决这个错误。
“typed-vuex”:“^0.2.0”,“@vue/eslint-config-typescript”:“7.0.0”,“typescript”:“~4.1.5”,
import Vuex from 'vuex'
import Vue from 'vue'
import { actionTree, getterTree, mutationTree } from 'typed-vuex'
import { vuexfireMutations, firebaseAction } from 'vuexfire'
import { db } from "../plugins/firebase/initializationApp"
import ProductType from "../components/ProguctCard.vue"
import 'firebase/database'
Vue.use(Vuex)
export const state = () => ({
products: [] as ProductType[],
});
export const getters = getterTree(state, {
getProducts: state => state.products,
});
export const mutations = mutationTree(state, {
...vuexfireMutations,
})
export const actions = actionTree(
{ state, getters, mutations },
{
bindProducts: firebaseAction(({ bindFirebaseRef }) => { < ERROR IS THIS LINE
// return the promise returned by `bindFirebaseRef`
return bindFirebaseRef('products', db.ref('products'))
}),
}
)
export default new Vuex.Store({
state,
getters,
actions,
mutations,
});