title: Nuxt.js Typescript - Error when trying to access data object in computed property
body: <p>I'm using the options api and when attempting to access a property of the Vue data object in a computed property I get an error in the typechecking.</p>
  
  <p><code>Property 'quantity' does not exist on type 'CombinedVueInstance&lt;Vue, unknown, unknown, { item: unknown; total: unknown; menuItemCategories: any; }, Readonly&lt;Record&lt;never, any&gt;&gt;&gt;'</code></p>
  
  <p>The property does exist since the page is able to load and display rendered template correctly using the computed property - only the type checker complains.</p>
  
  <p>The component code (simplified for length):</p>
  
  <pre class="lang-js prettyprint-override"><code>import Vue from "vue";
  export default Vue.extend({
    data() {
      quantity: 1,
    },
  
    computed: {
      total() {
        return this.item.price * this.quantity;
      }
    },
  });
  </code></pre>
  
  <p><strong>Edit</strong></p>
  
  <p>I've been able to work around the issue by using the <code>data</code> property as an object.</p>
  
  <p>This does create some issues though since it is best practice to use <code>data</code> as a function which returns an object. The same issue applies to <code>asyncData</code>.</p>
  
  <p>Further trial and error has shown I'm able to access the <code>data</code> function properties through the <code>methods</code> property. However if I use the <code>mapGetters</code> helper from vuex it throws the same type error as computed properties.</p>
  
  <p>The <code>methods</code> are also not available in the <code>CombinedVueInstance</code> type inside computed properties.</p>
  
  <p>tsconfig.json</p>
  
  <pre><code>// tsconfig.json
  {
    "compilerOptions": {
      "target": "es2018",
      "module": "esnext",
      "moduleResolution": "node",
      "lib": [
        "esnext",
        "esnext.asynciterable",
        "dom"
      ],
      "esModuleInterop": true,
      "allowJs": true,
      "sourceMap": true,
      "strict": true,
      "noEmit": true,
      "baseUrl": "./src",
      "paths": {
        "~/*": [
          "./*"
        ],
        "@/*": [
          "./*"
        ]
      },
      "types": [
        "@types/node",
        "@nuxt/types",
        "@nuxtjs/axios"
      ]
    },
    "exclude": [
      "node_modules"
    ]
  }
  </code></pre>
  
  <p>vue-shim.d.ts</p>
  
  <pre class="lang-js prettyprint-override"><code>declare module "*.vue" {
    import Vue from 'vue'
    export default Vue
  }
  </code></pre>