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

No JSDoc from global components (registered by unplugin-vue-components) #4816

Open
ferferga opened this issue Sep 5, 2024 · 0 comments
Open

Comments

@ferferga
Copy link
Contributor

ferferga commented Sep 5, 2024

Vue - Official extension or vue-tsc version

2.1.6

VSCode version

1.92.2

Vue version

3.5.1

TypeScript version

5.5.4

System Info

No response

package.json dependencies

"devDependencies": {
    "@types/node": "22.5.2",
    "@vitejs/plugin-vue": "5.1.3",
    "typescript": "5.5.4",
    "unplugin-vue-components": "0.27.4",
    "vite": "5.4.2",
    "vue-tsc": "2.1.6"
  },
  "dependencies": {
    "vue": "3.5.1"
  }

Steps to reproduce

  1. Download the project locally, open in VSCode and install all dependencies
  2. In App.vue, hover over JTransition and JSuspense

What is expected?

Both components have the proper JSDoc annotation given JTransition is properly registered as a GlobalComponent automatically by unplugin-vue-components and has full type annotation otherwise.

What is actually happening?

JTransition (imported automatically by unplugin-vue-components) does not show the JSDoc comment, while JSuspense (ignored in unplugin-vue-components and manually imported) does.

Link to minimal reproduction

https://stackblitz.com/edit/vue3-vite-typescript-starter-2bi7tj?file=src%2FApp.vue

Any additional comments?

It would also be great if the need for the setupJsdoc macro is removed, by doing this quick reproduction example I learned that it's possible to workaround it by adding an empty <script> tag, so perhaps it can be done by adding it to the virtual codegen (not sure if that's the real name, not knowledgeable enough of the codebase yet) that Volar uses and deprecate that macro?

@ferferga ferferga changed the title No JSDoc from global components (registered by ´unplugin-vue-components`) No JSDoc from global components (registered by unplugin-vue-components) Sep 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant