vuetify-module icon indicating copy to clipboard operation
vuetify-module copied to clipboard

TypeScript question

Open mirabledictu opened this issue 4 years ago • 1 comments

Hello, what is the difference between @nuxt/types and @nuxt/vue-app?

When generating a fresh Nuxt TypeScript app, you'll get @nuxt/types in the types property of tsconfig.json already. But in the README of vuetify-module, you have this:

{
  "compilerOptions": {
    "types": [
      "@types/node",
      "@nuxt/vue-app",
      "@nuxtjs/vuetify"
    ]
  }
}

Are they different?

mirabledictu avatar Jul 12 '21 04:07 mirabledictu

It's not easy to understand. But I think we should use @nuxt/types since Nuxt 2.9.0+ and remove @nuxt/vue-app. I think the documentation of this plugin is just too old.

That's the right way:

    "types": [
      "@types/node",
      "@nuxt/types",
      "@nuxtjs/vuetify"
    ]

I also found this https://github.com/nuxt/nuxt.js/blob/dev/packages/vue-app/index.d.ts

MartinX3 avatar Jul 01 '22 15:07 MartinX3