title: Accessing store in Vue3 using Typescript
body: <p>I am building a Vue3 app using TypeScript using Vuex for storing certain data. However I am unable to access the <code>$store</code> in the script tag of my main <em>App.vue</em> or other components in general.</p>
  <p>My vuex store looks somewhat like:</p>
  <pre><code>export default createStore({
    state: {
      members: [
        { id: 1, name: &quot;Alice&quot;, role: &quot;admin&quot;, email: &quot;abc@example.com&quot; }
      ] as Member[],
      size: 5
    },
    mutations: {
      addMember(state, member: Member): void {
        state.members.push(member);
      }
    },
    getters: {
      membersList(state) {
        return state.members;
      },
    }
  })
  </code></pre>
  <p>The script tag of my App.vue file:</p>
  <pre><code>&lt;script lang=&quot;ts&quot;&gt;
  import { defineComponent } from &quot;vue&quot;;
  //import MemberCard from &quot;./components/MemberCard.vue&quot;;
  export default defineComponent({
    name: &quot;App&quot;,
    components: {
     // MemberCard
    },
    data() {
      return {
        
      };
    },
    computed:{
      func(){
        return this.$store.getters.membersList;
      }
    }
  });
  &lt;/script&gt;
  </code></pre>
  <p>I am still learning the ropes on Vue3 and TypeScript. Thanks in advance!</p>