[Vuejs]-Property '$auth' does not exist on type Promise

0👍

Your default export:

export default {
  ssr: true,

  // ...

  typescript: {
    typeCheck: {
      eslint: {
        files: './**/*.{ts,js,vue}'
      }
    }
  },
};

Should actually be wrapped with Vue.extend, like so:

export default Vue.extend({
  ssr: true,

  // ...

  typescript: {
    typeCheck: {
      eslint: {
        files: './**/*.{ts,js,vue}'
      }
    }
  },
});

This should result in TSC seeing the proper types when using the object now.

(By the way, the title is very misleading when compared to the actual TSC error that you had shown)

Leave a comment