Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork378
fix: tsx component type declaration#673
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
It should be done under a flag. As it provides global types, while this plugin only transform Vue's complication result, which will create misalignment between types and actual behaviour |
lishaobos commentedAug 8, 2023 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
@antfu i have an idea.
|
cmdyu commentedSep 14, 2023
I solved the problem in this way: created a 'components-tsc.d.ts' file manually export{}declareglobal{constNButton:typeofimport('naive-ui')['NButton']} and put it in the tsconfig.json's include prop {"include":["env.d.ts","src/**/*","src/**/*.vue","auto-imports.d.ts","components-tsx.d.ts"], ...} |
whaaaley commentedOct 20, 2024
I was curious if there's anything I could do to help get this merged. I've been struggling with types in this way for some time. |
wjp980108 commentedMay 13, 2025
It's been two years, how to solve this problem |
cangSDARM commentedMay 27, 2025
any problems? why this pr put on hold |
Description
make auto imported component work with tsx
Linked Issues
#669
Additional context