-
-
Notifications
You must be signed in to change notification settings - Fork 8.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 issue with importing type from vue #8756
Comments
Hi, thanks for your reply. For some reasons, I cannot get the
And I pass the However, |
Ah! I didn't look carefully, but currently, I have separated Button and Link into two separate components. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Vue version
3.3.4
Link to minimal reproduction
https://github.com/tragid/vue-default-export-error
Steps to reproduce
I'm trying to build a Button component using Typescript and utilizing types of HTML element imported from Vue package. Here is the code:
What is expected?
The type should be imported normally without any error.
What is actually happening?
Vue throws error:
[@vue/compiler-sfc] Unresolvable type reference or unsupported built-in utility type
It's kind of strange because I can still access the attributes from
props
variable likeprops.href
but the app is not running.What I tried is to create alternative types that extend
ButtonHTMLAttributes
andLinkHTMLAttributes
, it's like:The import error is gone but the app is still not functioning properly. When I add a
href
prop to the component, seems like the component doesn't recognizehref
propSystem Info
No response
Any additional comments?
No response
The text was updated successfully, but these errors were encountered: