Skip to content

types: omit declaration in the entries for "rollup" and "copy" builders #530

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 2 commits into
base: main
Choose a base branch
from

Conversation

kricsleo
Copy link
Member

resolves #529

@kricsleo kricsleo changed the title fix: omit declaration from builders that do not support it fix: omit declaration in the entries for "rollup" and "copy" builders Apr 13, 2025
@pi0 pi0 changed the title fix: omit declaration in the entries for "rollup" and "copy" builders types: omit declaration in the entries for "rollup" and "copy" builders Apr 14, 2025
options.declaration !== undefined &&
entry.declaration === undefined
) {
entry.declaration = !!options.declaration;
Copy link
Member

@pi0 pi0 Apr 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's keep runtime simple. it is simply an additional feature used by mkdist

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

keep runtime simple.

Otherwise, we’d need @ts-expect-error to suppress type errors...

used by mkdist

Not just mkdist, untyped also uses it: https://github.com/unjs/unbuild/blob/main/src/builders/untyped/index.ts#L70

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.

declaration inside entries have no effect
2 participants