Skip to content

vue-tsc v2.2.8 cases type error after emitting declaration files #5232

@qmhc

Description

@qmhc

Vue - Official extension or vue-tsc version

^2.2.8

VSCode version

none

Vue version

^3.5.13

TypeScript version

~5.7.3

System Info

System:
  OS: Linux 5.0 undefined
  CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
  Memory: 0 Bytes / 0 Bytes
  Shell: 1.0 - /bin/jsh
Binaries:
  Node: 18.20.3 - /usr/local/bin/node
  Yarn: 1.22.19 - /usr/local/bin/yarn
  npm: 10.2.3 - /usr/local/bin/npm
  pnpm: 8.15.6 - /usr/local/bin/pnpm

package.json dependencies

{
  "name": "dts-test",
  "version": "0.0.0",
  "private": true,
  "type": "module",
  "scripts": {
    "dev": "vite",
    "build": "run-p type-check \"build-only {@}\" --",
    "preview": "vite preview",
    "build-only": "vite build",
    "type-check": "vue-tsc --build",
    "tsc": "vue-tsc --noEmit false --declaration --emitDeclarationOnly --declarationMap --outDir dist"
  },
  "dependencies": {
    "vue": "^3.5.13"
  },
  "devDependencies": {
    "@tsconfig/node22": "^22.0.0",
    "@types/node": "^22.13.4",
    "@vitejs/plugin-vue": "^5.2.1",
    "@vue/tsconfig": "^0.7.0",
    "npm-run-all2": "^7.0.2",
    "typescript": "~5.7.3",
    "vite": "^6.2.0",
    "vite-plugin-vue-devtools": "^7.7.2",
    "vue-tsc": "^2.2.8"
  }
}

Steps to reproduce

Run pnpm run tsc then check ./dist/App.vue.d.ts.

What is expected?

No type error in ./dist/App.vue.d.ts.

What is actually happening?

Many __VLS_Xxxx types case error.

Link to minimal reproduction

https://stackblitz.com/edit/vitejs-vite-oc7njgdm?file=package.json&view=editor

Any additional comments?

Might be this commit imported the issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    good reproduction ✨This issue provides a good reproduction, we will be able to investigate it first🔨 p3-minor-bug

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions