Skip to content

feat: enhance TypeScript declaration generation#840

Open
kuoruan wants to merge 4 commits into
unplugin:mainfrom
kuoruan:feat-dts
Open

feat: enhance TypeScript declaration generation#840
kuoruan wants to merge 4 commits into
unplugin:mainfrom
kuoruan:feat-dts

Conversation

@kuoruan

@kuoruan kuoruan commented May 8, 2025

Copy link
Copy Markdown

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
@bolt-new-by-stackblitz

Copy link
Copy Markdown

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

kuoruan commented May 9, 2025

Copy link
Copy Markdown
Author

@antfu Can you please review this?

@antfu

antfu commented May 26, 2025

Copy link
Copy Markdown
Member

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

@kuoruan

kuoruan commented May 26, 2025

Copy link
Copy Markdown
Author

@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