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

Update type import syntax to fix TS <4.5 compatibility #69

Closed
wants to merge 1 commit into from

Conversation

vmizg
Copy link

@vmizg vmizg commented Jun 20, 2023

I'm using this module in a monorepo where TypeScript gets resolved to a lower version than v4.5 in some packages. The syntax introduced in v7 is not compatible with these versions. This is a straightforward fix.

See: https://www.typescriptlang.org/docs/handbook/modules.html#importing-types

@sindresorhus
Copy link
Owner

Thanks for the suggestion, but I want to use the type import. I suggest upgrading TypeScript. Even 4.7 is an old version.

@vmizg
Copy link
Author

vmizg commented Jun 20, 2023

Right, but this is a breaking change that is not clearly documented. Many external projects have not yet migrated to TS 5 however you'd like to put it. And the suggested type import is a feature that, I'm pretty sure, will live on. Not a drastic change, IMO.

Regardless, I respect the decision.

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

Successfully merging this pull request may close these issues.

None yet

2 participants