-
Notifications
You must be signed in to change notification settings - Fork 142
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix invalid output code when eliding TS star imports
From some manual testing, I noticed that the code: ```ts import A, * as B from "./A"; console.log(A); ``` becomes this invalid code: ```ts import A, from "./A"; console.log(A); ``` The `* as B` was being elided because it's treated as a type-only import, but in this case we need to elide the comma as well since there's no concept of "trailing commas" here. The code to do that is a little clunky, but I ended up always removing the comma and using a boolean to track whether it should be added back.
- Loading branch information
1 parent
66da4d1
commit 98ee525
Showing
2 changed files
with
41 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters