-
Notifications
You must be signed in to change notification settings - Fork 538
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
refactor(tsconfig): enable verbatimModuleSyntax #4237
Conversation
|
size-limit report 📦
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TIL!
I don't know the tradeoffs of this, but trust you with it!
Just confirming, I understand this does not change how types can imported outside the package, right?
@siddharthkp correct! Should be no change at all downstream. I think that, for us, the only drawback is that we have to explicitly annotate type imports. |
* refactor(tsconfig): enable verbatimModuleSyntax * refactor(ts): eslint autofix verbatimModuleSyntax * chore: run formatting * chore(eslint): apply autofix * fix: update type import syntax --------- Co-authored-by: Josh Black <joshblack@users.noreply.github.com>
* refactor(tsconfig): enable verbatimModuleSyntax * refactor(ts): eslint autofix verbatimModuleSyntax * chore: run formatting * chore(eslint): apply autofix * fix: update type import syntax --------- Co-authored-by: Josh Black <joshblack@users.noreply.github.com>
Based on changes over in: https://github.com/github/github/pull/293430
This PR enables the
verbatimModuleSyntax
option in our basetsconfig
. This change prevents some of the challenges we were running into where Gatsby or Storybook were reporting issues importing/finding certain imports that were using type elision (where TS detects that you're importing a type but bundlers may not be aware that it is a type).Note: this still allows mixed imports as long as
type
is included before the named import. For example:Changelog
New
Changed
verbatimModuleSyntax
option intsconfig.base.json
Removed
Rollout strategy
I believe no public change should be perceivable through this refactor
Testing & Reviewing