Skip to content

feat: enhance TypeScript declaration generation #840

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

kuoruan
Copy link

@kuoruan kuoruan commented May 8, 2025

Description

This PR allows the user:

  • generate multiple dts files
  • ignore declaration generate for some components or directives.

Linked Issues

No

Additional context

@kuoruan kuoruan requested a review from antfu as a code owner May 8, 2025 15:06
Copy link

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@kuoruan kuoruan marked this pull request as draft May 8, 2025 15:06
@kuoruan kuoruan marked this pull request as ready for review May 9, 2025 02:41
@kuoruan
Copy link
Author

kuoruan commented May 9, 2025

@antfu Can you please review this?

@antfu
Copy link
Member

antfu commented May 26, 2025

What's the reason you want it to generate multiple files? I am not sure if the complexity here is worth it

@kuoruan
Copy link
Author

kuoruan commented May 26, 2025

@antfu The main purpose is to ignore definition for some components.
For example, some component libraries (like naive-ui or unplugin-icons) already provide d.ts files, but since unplugin-vue-components doesn't have a way to ignore it. The components.d.ts file will always be changed when collaborating on a project, which can easily cause conflicts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants