Skip to content

Conversation

wnayes
Copy link
Contributor

@wnayes wnayes commented Jun 24, 2022

Fixes #49450

See investigation notes in issue. In short, it seems like the removal of the type only "import equals" declaration was not occurring because it relied on type information about the alias itself. We can still elide correctly under transpileModule by noticing when an export declaration is type only.

@typescript-bot typescript-bot added the For Milestone Bug PRs that fix a bug with a specific milestone label Jun 24, 2022
@ghost
Copy link

ghost commented Jun 24, 2022

CLA assistant check
All CLA requirements met.

@wnayes wnayes requested a review from andrewbranch July 1, 2022 03:20
Copy link
Member

@andrewbranch andrewbranch left a comment

Choose a reason for hiding this comment

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

This looks right, but could you also add a test and check for export { type IFoo }? It looks like that construct probably needs to be fixed too. Thanks!

@wnayes wnayes requested a review from andrewbranch July 2, 2022 05:12
Copy link
Member

@andrewbranch andrewbranch left a comment

Choose a reason for hiding this comment

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

Thank you!

@andrewbranch andrewbranch merged commit 501e442 into microsoft:main Jul 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
For Milestone Bug PRs that fix a bug with a specific milestone
Projects
None yet
Development

Successfully merging this pull request may close these issues.

transpileModule does not elide type only "import equals"
3 participants