Answers for "Property '$store' does not exist on type"

0

Property '$store' does not exist on type

// https://stackoverflow.com/questions/64412243/vue-js-3-and-typescript-property-store-does-not-exist-on-type-componentpub
// add file named 'vuex-shim.d.ts', with contents:

import { ComponentCustomProperties } from 'vue'
import { Store } from 'vuex'

declare module '@vue/runtime-core' {
  // Declare your own store states.
  interface State {
    count: number
  }

  interface ComponentCustomProperties {
    $store: Store<State>
  }
}
Posted by: Guest on September-26-2021

Code answers related to "Property '$store' does not exist on type"

Code answers related to "TypeScript"

Browse Popular Code Answers by Language