Skip to content
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

Fix: Do not combine default type imports with value imports #38

merged 2 commits into from Oct 24, 2022


Copy link

@IanVS IanVS commented Oct 24, 2022

This fixes a bug which was causing default type imports to be combined into value imports, which isn't safe to do. For instance,

import { ComponentProps, useEffect } from 'react';
import type React from 'react';

was turning into

import { ComponentProps, useEffect, React } from 'react';

Which is not correct. This change prevents default type imports from ever being merged.

Copy link
Owner Author

IanVS commented Oct 24, 2022

I'm going to merge this to get the fix released, but I'd still love an ex post facto review if anyone has some time.

@IanVS IanVS merged commit 274468f into main Oct 24, 2022
6 checks passed
@IanVS IanVS deleted the avoid-default-type-combining branch October 24, 2022 13:44
Copy link

@fbartho fbartho left a comment

Choose a reason for hiding this comment

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

Looks great @IanVS, good catch!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.

None yet

2 participants