refactor: use import type for type-only imports#3052
Open
bennypowers wants to merge 1 commit intomasterfrom
Open
refactor: use import type for type-only imports#3052bennypowers wants to merge 1 commit intomasterfrom
bennypowers wants to merge 1 commit intomasterfrom
Conversation
|
3ea8652 to
5594d8f
Compare
This was referenced Mar 26, 2026
03dd770 to
9658001
Compare
Add explicit `type` annotations to all type-only imports and exports. This is a pure TypeScript syntax change with no runtime effect -- the compiled JavaScript output is identical. It prepares for Node 24's type stripping, which requires `import type` for type-only imports since they are erased at runtime. 93 files changed across dev-server, test-runner, rollup-plugin, and storybook packages. Assisted-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
9658001 to
40d0748
Compare
Member
Author
|
We should be able to ignore the test failures on node 22:
|
web-padawan
approved these changes
Mar 26, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Add
import type/export typeannotations to type-only imports across 85 source files. No runtime effect.PR 1/4 in the Node 24 migration:
import typeannotations.tsimports