title: How can I use a vuex store in a plugin?
body: <p>In my Vue plugin, I am passing the Vuex store as part of the options during the <code>install</code></p>
  
  <p><strong>main.ts (main project):</strong></p>
  
  <pre class="lang-js prettyprint-override"><code>import store from "./store/";
  
  Vue.use(Camera, { store });
  
  new Vue({
      router,
      store,
      render: h =&gt; h(AppName)
  }).$mount("#app");
  </code></pre>
  
  <p><strong>main.ts (in plugin):</strong></p>
  
  <pre class="lang-js prettyprint-override"><code>export default {
      install(Vue, options: any) {
          var result = options.store.getters['getFeaturesList']; // result is the correct object I need
  
          Vue.prototype.$myStore = function() {
              return options.store;
          }
  
          Vue.component("camera-control", Camera);
      }
  }
  </code></pre>
  
  <p>However, when I try and access the prototype property in a component inside the plugin, it's telling me that <code>Property '$myStore' does not exist on type 'Camera'</code></p>
  
  <p><strong>Camera.vue (in plugin)</strong></p>
  
  <pre class="lang-js prettyprint-override"><code>public getFeatureList() {
      const featuresList = this.$myStore().getters["getFeaturesList"]; //error
  }
  </code></pre>
  
  <p>I am assuming that the instances are not the same in the install function and the component, hence why it's giving me the error, but I need to be able to access the main project's store from the plugin - is this even possible? How would I get access to the store?</p>