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
Astro v4.5.9
Node v18.14.2
System Linux (x64)
Package Manager npm
Output static
Adapter none
Integrations @astrojs/vue
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
When importing a vue component inside of an astro component, the props and their types are being recognized correctly.
When importing a vue component directly from a dependency like a component library like primevue, the props are not being recognized correctly.
The following error occurs when trying to set a valid prop on a directly imported component from a library: Type '{ link: true; }' is not assignable to type 'IntrinsicAttributes'. Property 'link' does not exist on type 'IntrinsicAttributes'.ts(2322)
The local devserver works totally fine despite the error, but when trying to build the project and running astro check && astro build, the check fails with the following output:
> astro check && astro build
14:59:05 Types generated 117ms
14:59:05 [check] Getting diagnostics for Astro files in /home/ubuntu/temp/astro-vue-library-bug-reproduction...
src/pages/index.astro:18:17 - error ts(2322): Type '{ children: string; link: true; }' is not assignable to type 'IntrinsicAttributes'.
Property 'link' does not exist on type 'IntrinsicAttributes'.
18 <Button link>Library button component</Button>
~~~~
Result (3 files):
- 1 error
- 0 warnings
- 0 hints
ELIFECYCLE Command failed with exit code 1.
What's the expected result?
The types of the component imported from a library should be recognized correctly, as if the component were a local file within my project
Astro Info
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
When importing a vue component inside of an astro component, the props and their types are being recognized correctly.
When importing a vue component directly from a dependency like a component library like primevue, the props are not being recognized correctly.
The following error occurs when trying to set a valid prop on a directly imported component from a library:
Type '{ link: true; }' is not assignable to type 'IntrinsicAttributes'. Property 'link' does not exist on type 'IntrinsicAttributes'.ts(2322)
The local devserver works totally fine despite the error, but when trying to build the project and running
astro check && astro build
, the check fails with the following output:What's the expected result?
The types of the component imported from a library should be recognized correctly, as if the component were a local file within my project
Link to Minimal Reproducible Example
https://stackblitz.com/~/github.com/mariolang-schmalz/astro-vue-library-bug-reproduction
Participation
The text was updated successfully, but these errors were encountered: