Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'import type' declarations can only be used in TypeScript files. javascript #4270

Open
ZoeLeee opened this issue Apr 15, 2024 · 0 comments
Open

Comments

@ZoeLeee
Copy link

ZoeLeee commented Apr 15, 2024

image

image

Vue files do not support TypeScript syntax.

tsconfig.json

// Generated by nuxi
{
  "compilerOptions": {
    "forceConsistentCasingInFileNames": true,
    "jsx": "preserve",
    "jsxImportSource": "vue",
    "target": "ESNext",
    "module": "ESNext",
    "moduleResolution": "Bundler",
    "skipLibCheck": true,
    "isolatedModules": true,
    "useDefineForClassFields": true,
    "strict": true,
    "noImplicitThis": true,
    "esModuleInterop": true,
    "types": [],
    "verbatimModuleSyntax": true,
    "allowJs": true,
    "noEmit": true,
    "resolveJsonModule": true,
    "allowSyntheticDefaultImports": true,
    "paths": {
      "~": [
        ".."
      ],
      "~/*": [
        "../*"
      ],
      "@": [
        ".."
      ],
      "@/*": [
        "../*"
      ],
      "~~": [
        ".."
      ],
      "~~/*": [
        "../*"
      ],
      "@@": [
        ".."
      ],
      "@@/*": [
        "../*"
      ],
      "assets": [
        "../assets"
      ],
      "assets/*": [
        "../assets/*"
      ],
      "public": [
        "../public"
      ],
      "public/*": [
        "../public/*"
      ],
      "#app": [
        "../../../node_modules/.pnpm/nuxt@3.10.3_eslint@8.56.0_sass@1.71.1_vite@4.5.3/node_modules/nuxt/dist/app"
      ],
      "#app/*": [
        "../../../node_modules/.pnpm/nuxt@3.10.3_eslint@8.56.0_sass@1.71.1_vite@4.5.3/node_modules/nuxt/dist/app/*"
      ],
      "vue-demi": [
        "../../../node_modules/.pnpm/nuxt@3.10.3_eslint@8.56.0_sass@1.71.1_vite@4.5.3/node_modules/nuxt/dist/app/compat/vue-demi"
      ],
      "#image": [
        "../../../node_modules/.pnpm/@nuxt+image@1.3.0/node_modules/@nuxt/image/dist/runtime"
      ],
      "#image/*": [
        "../../../node_modules/.pnpm/@nuxt+image@1.3.0/node_modules/@nuxt/image/dist/runtime/*"
      ],
      "pinia": [
        "../../../node_modules/.pnpm/pinia@2.1.7_vue@3.3.13/node_modules/pinia/dist/pinia"
      ],
      "#vue-router": [
        "./vue-router-stub"
      ],
      "#imports": [
        "./imports"
      ],
      "#build": [
        "."
      ],
      "#build/*": [
        "./*"
      ],
      "#components": [
        "./components"
      ]
    }
  },
  "include": [
    "./nuxt.d.ts",
    "../**/*",
    "../../../node_modules/.pnpm/@vueuse+nuxt@10.7.2_nuxt@3.10.3_vue@3.3.13/node_modules/@vueuse/nuxt/runtime",
    "../../../node_modules/.pnpm/nuxt-windicss@2.6.1_vite@4.5.3/node_modules/nuxt-windicss/runtime",
    "../../../node_modules/.pnpm/@nuxt+image@1.3.0/node_modules/@nuxt/image/runtime",
    "../../../node_modules/.pnpm/@pinia+nuxt@0.5.1_vue@3.3.13/node_modules/@pinia/nuxt/runtime",
    "../../../node_modules/.pnpm/@nuxt+devtools@1.0.8_nuxt@3.10.3_vite@4.5.3/node_modules/@nuxt/devtools/runtime",
    "../../../node_modules/.pnpm/@nuxt+telemetry@2.5.3/node_modules/@nuxt/telemetry/runtime",
    "..",
    "../../../node_modules/.pnpm/nuxt@3.10.3_eslint@8.56.0_sass@1.71.1_vite@4.5.3/node_modules/nuxt/dist/app",
    "../../../node_modules/.pnpm/nuxt@3.10.3_eslint@8.56.0_sass@1.71.1_vite@4.5.3/node_modules/nuxt/dist/app/compat/vue-demi",
    "../../../node_modules/.pnpm/@nuxt+image@1.3.0/node_modules/@nuxt/image/dist/runtime",
    "../../../node_modules/.pnpm/pinia@2.1.7_vue@3.3.13/node_modules/pinia/dist/pinia"
  ],
  "exclude": [
    "../node_modules",
    "../../../node_modules",
    "../../../node_modules/.pnpm/nuxt@3.10.3_eslint@8.56.0_sass@1.71.1_vite@4.5.3/node_modules/nuxt/node_modules",
    "../../../node_modules/.pnpm/@vueuse+nuxt@10.7.2_nuxt@3.10.3_vue@3.3.13/node_modules/@vueuse/nuxt/runtime/server",
    "../../../node_modules/.pnpm/nuxt-windicss@2.6.1_vite@4.5.3/node_modules/nuxt-windicss/runtime/server",
    "../../../node_modules/.pnpm/@nuxt+image@1.3.0/node_modules/@nuxt/image/runtime/server",
    "../../../node_modules/.pnpm/@pinia+nuxt@0.5.1_vue@3.3.13/node_modules/@pinia/nuxt/runtime/server",
    "../../../node_modules/.pnpm/@nuxt+devtools@1.0.8_nuxt@3.10.3_vite@4.5.3/node_modules/@nuxt/devtools/runtime/server",
    "../../../node_modules/.pnpm/@nuxt+telemetry@2.5.3/node_modules/@nuxt/telemetry/runtime/server",
    "../dist",
    "../.output"
  ]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant