feat: introduce dtsTsx for TSX support#673
Merged
antfu merged 6 commits intounplugin:mainfrom Oct 19, 2025
Merged
Conversation
Co-authored-by: 内小子 <nbn1209@126.com>
Member
|
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 |
Contributor
Author
|
@antfu i have an idea.
|
|
I solved the problem in this way: created a 'components-tsc.d.ts' file manually export {}
declare global {
const NButton: typeof import('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"],
...
} |
|
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. |
|
It's been two years, how to solve this problem |
|
any problems? why this pr put on hold |
antfu
approved these changes
Oct 19, 2025
commit: |
dtsTsx for TSX support
This was referenced Feb 27, 2026
This was referenced Feb 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Description
make auto imported component work with tsx
Linked Issues
#669
Additional context