Skip to content
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

fix: imports and exports follows type-only #333

Merged
merged 2 commits into from
Feb 6, 2025

Conversation

kricsleo
Copy link
Contributor

@kricsleo kricsleo commented Feb 6, 2025

resolves #311

I've been working on an approach that might seem a bit unconventional and wondering if you could review and provide feedback on these implementation details:

  1. Preprocessing source code by renaming and adding type aliases to preserve import/export variable type information in variable names

  2. Restoring import/export variable type information in the renderChunk phase based on the variable names containing type information

Would love to hear your thoughts on potential improvements or simpler alternatives.
Are there any concerns or better approaches you can suggest?

Copy link
Owner

@Swatinem Swatinem left a comment

Choose a reason for hiding this comment

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

looks reasonable to me, thanks a lot :-)

@kricsleo
Copy link
Contributor Author

kricsleo commented Feb 7, 2025

If a new version is to be released, I would suggest an rc version. 🤔
Because I'm not sure if this will cause any unintended disruptive changes (due to many edge cases).

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.

type only exports of classes are not respected
2 participants