You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains hidden or 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 makes the auto-imports behavior of verbatimModuleSyntax available as an editor preference, independent of compiler options. Stylistic preference for type-only imports has been a popular demand since the syntax was introduced, and compiler options which may or may not be appropriate for a userβs actual compilation have long been adopted for their side effects on auto-import behavior. This setting allows users to separate their stylistic preference from picking the right compiler options for their actual use case.
The reason will be displayed to describe this comment to others. Learn more.
Seems good to me, though I can't help but feel like we're going in circles a bit π
I guess anyone who actually wants to enforce this needs verbatimModuleSyntax and/or the two ts-eslint rules, and this at least helps the editor do the right thing, more or less exactly like my proposal for how we should better handle import sorting.
Looks like you're introducing a change to the public API surface area. If this includes breaking changes, please document them on our wiki's API Breaking Changes page.
I'll confess to being possibly unhealthily interested in being exact in the type (ha!) of my imports. Every time a type import is used, an angel gets their wings.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #55675
This makes the auto-imports behavior of
verbatimModuleSyntax
available as an editor preference, independent of compiler options. Stylistic preference for type-only imports has been a popular demand since the syntax was introduced, and compiler options which may or may not be appropriate for a userβs actual compilation have long been adopted for their side effects on auto-import behavior. This setting allows users to separate their stylistic preference from picking the right compiler options for their actual use case.