You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The main issue is that typescript recognises primevue components in typings without explicit importing it. This does not cause any errors in the IDE/build and also does not render the component i.e. a primevue Card.
I don't want to use the autoimport approach because I prefer an explicit import and component.d.ts seems to cause a lot of issues like intellisense and file changes out of sync.
I would like the error to appear compile time if I do forget to import this explicitly or register it as a global component. Any ideas how I can achieve this?
Inspect the App.vue and main.ts files in VSCode with the Vue - Official (Vue.volar) extension.
Expected behavior
Without a global component registered or an explicit import, Button should display an error message.
Or it should not having typing for Button as that is misleading.
The text was updated successfully, but these errors were encountered:
We're unable to replicate your issue, if you are able to create a reproducer or add details please edit this issue. This issue will be closed if no activities in 20 days.
Describe the bug
I'm using primevue with typescript. I've got a pretty basic setup for initialising prime vue with the app:
The main issue is that typescript recognises primevue components in typings without explicit importing it. This does not cause any errors in the IDE/build and also does not render the component i.e. a primevue Card.
I don't want to use the autoimport approach because I prefer an explicit import and component.d.ts seems to cause a lot of issues like intellisense and file changes out of sync.
This is my tsconfig.json:
I would like the error to appear compile time if I do forget to import this explicitly or register it as a global component. Any ideas how I can achieve this?
Reproducer
https://stackblitz.com/edit/primevue-4-ts-vite-issue-template-rxeego?file=src%2FApp.vue
PrimeVue version
4.2.1
Vue version
4.x
Language
TypeScript
Build / Runtime
Vite
Browser(s)
No response
Steps to reproduce the behavior
Inspect the
App.vue
andmain.ts
files in VSCode with theVue - Official (Vue.volar)
extension.Expected behavior
Without a global component registered or an explicit import,
Button
should display an error message.Or it should not having typing for Button as that is misleading.
The text was updated successfully, but these errors were encountered: