Skip to content

generic component TS type hint error after upgrading version from 3.1.6 to 3.1.7 #5823

@fuxichen

Description

@fuxichen

Vue - Official extension or vue-tsc version

3.1.7

VSCode version

1.106.3

Vue version

^3.5.13

TypeScript version

5.7.2

System Info

System:
    OS: macOS 26.1
    CPU: (12) arm64 Apple M4 Pro
    Memory: 178.52 MB / 24.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 22.20.0 - /Users/fuhao/.nvm/versions/node/v22.20.0/bin/node
    npm: 10.9.3 - /Users/fuhao/.nvm/versions/node/v22.20.0/bin/npm
    pnpm: 10.12.3 - /Users/fuhao/.nvm/versions/node/v22.20.0/bin/pnpm
  Browsers:
    Chrome: 143.0.7499.41
    Safari: 26.1

package.json dependencies

"dependencies": {
    "vue": "^3.5.13"
  },
  "devDependencies": {
    "@vitejs/plugin-vue": "^5.2.1",
    "typescript": "^5.7.2",
    "vite": "^6.0.3",
    "vue-tsc": "^2.1.10"
  }

Steps to reproduce

  1. Create a generic component (in TypeScript)
  2. Use generic type parameters / Use generic props
2025-12-08.14.34.00.mov

What is expected?

There should be complete type hints when using generic properties.

What is actually happening?

When using ?. or ., the generic property type becomes any.

Link to minimal reproduction

https://codesandbox.io/p/devbox/naughty-water-9h4hdy

Any additional comments?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood 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