-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Typescript support is non-existent in All components #6152
Comments
I'll check with the team, thanks. We are not aware of any issues until now but worth checking because the team spends a lot of time on type checking. |
Vue recommends activating the Volar extension for VSCode after disabling Vetur. Have you had a chance to try this? |
Yes, using Volar with Typescript with the recommended configuration for Nvim. The weird thing is that other components have type-checking just fine. |
Just by sheer amounts of tries, I've had it working sometimes when my main typescript configuration breaks. Very weird. I've changed my configuration in every each way, still getting this error. Again, the weird part is that other 3rd party components work just fine |
Could you try to fork and use this example locally? Also, sharing a demo or a repo with your setup helps us. |
Nope, might have spoken too soon. |
A demo or a repository that we can test on would be very useful. |
Updating to 4.0.4 did not solve this for me. I want to understand if I should not expect to have type-safety in slots while using the library. Here, this is a bare repo started with the recommended way (bun create vue@latest) with typescript. Let me know if this is a configuration issue on my side or not. Because right now, nor me nor my coworker can get this to work. https://github.com/rafaelsmgomes/vue-test/tree/main |
Same issue here on VSCode + Vue (official) extensions and [email protected]. (macOS 14.5) |
It may be related to #6060 |
To the PrimeVue team. The issue is the When the import is replaced with DefineComponent from vue, intellisense works as expected for props. I'm sure it's not a fully solution as M and E aren't being spread to the proper generic arguments, but I think there might be an issue with some of the empty objects being passed as args. |
Okay yeah I see the problem. The empty objects are overriding generics that are based on P. I'll submit a PR. |
Hey guys, any news about this? |
I created a PR to fix this |
Experiencing the same issue (v.4.1.0) |
Describe the bug
I get no typescript support on my template section with Primevue.
There is no destructuring, no way of knowing what props do I need to pass to the template slots.
It's really bad.
I thought the problem was just mine, but I don't think so.
I use neovim, so I tried fumbling with the configuration (mind you this does not happen with other 3rd-party components).
Then I gave up and switched to VSCode, still nothing.
Dug through the documentation, basically almost no mention to typescript, except to say it has stellar support.
One of my coworkers has the exact same problem. So I don't think this is just me.
And there is no word anywhere of this issue. Either we're the only people facing this or most users don't use typescript.
If I'm wrong, please point to me where in the docs do I need to look to set this up to work.
Best
Reproducer
I also don't get hints on stackblitz
PrimeVue version
4.0.0-rc.2
Vue version
4.x
Language
TypeScript
Build / Runtime
Vue CLI App
Browser(s)
No response
Steps to reproduce the behavior
Just start a regular project with the recommended Vue build script.
Then follow the steps to install Primevue.
Expected behavior
I expected some hints on the templates section, maybe I should not expect those.
The text was updated successfully, but these errors were encountered: