title: Property '$store' does not exist on type 'ComponentPublicInstance' using Vuex 4 with typescript
body: <p>I have a project where I am using typescript and vue with vuex, I am having this error on  VSCode:</p>
  <pre><code>Property '$store' does not exist on type 'ComponentPublicInstance&lt;{}, {}, {}, { errors(): any; }, { eliminarError(error: string): void; }, EmitsOptions, {}, {}, false, ComponentOptionsBase&lt;{}, {}, {}, { errors(): any; }, { eliminarError(error: string): void; }, ... 4 more ..., {}&gt;&gt;'
  </code></pre>
  <p>I read <a href="https://next.vuex.vuejs.org/guide/typescript-support.html" rel="nofollow noreferrer">the documentation</a> and there it says I have to add a d.ts file with this content:</p>
  <pre class="lang-js prettyprint-override"><code>// vuex.d.ts
  import { ComponentCustomProperties } from 'vue'
  import { Store } from 'vuex'
  
  declare module '@vue/runtime-core' {
    // declare your own store states
    interface State {
      count: number
    }
  
    // provide typings for `this.$store`
    interface ComponentCustomProperties {
      $store: Store&lt;State&gt;
    }
  }
  </code></pre>
  <p>But then VSCode complains than <code>'ComponentCustomProperties' is defined but never used</code>, and it is still show the first error I mentioned</p>
  <p>How can I solve this issues?</p>