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

Use import type instead of import while importing types #262

Merged
merged 6 commits into from
Oct 16, 2023
Merged

Use import type instead of import while importing types #262

merged 6 commits into from
Oct 16, 2023

Conversation

DarhkVoyd
Copy link
Contributor

@DarhkVoyd DarhkVoyd commented Sep 30, 2023

Description

This PR addresses an issue where TypeScript files earlier used the import syntax instead of the more specific import type. The import type syntax in TypeScript is used to import only the types from a module, rather than the entire module which can be useful for quite a few reasons.

Key Changes:

  • Updated TypeScript files to use the import type syntax.
  • The imports which were unused were left untouched due to ambiguity regarding their purpose.

Resolves: #207

@Sadaf-A
Copy link
Contributor

Sadaf-A commented Sep 30, 2023

@DarhkVoyd Thanks for working on this issue. Your contribution is really appreciated.
I have a few suggestions please change the title of your pr to "Use import type instead of import while importing types"
in the description replace "closes: #207" to "Resolves: #207" as that is the convention we follow as of now.
and great work! all the tests are passing and there are no linting errors everything looks good to me.

@DarhkVoyd DarhkVoyd changed the title use import type instead of import Use import type instead of import while importing types Sep 30, 2023
@DarhkVoyd DarhkVoyd changed the title Use import type instead of import while importing types Use import type instead of import while importing types Sep 30, 2023
@rannn505
Copy link
Contributor

rannn505 commented Oct 4, 2023

@DarhkVoyd as disscussed at the Discord, please add the rule to the .eslint config file -

"rules": {

then commit the change, then run cd ts; npm run lint, then see if you have some diff it means you missed some places, then if everything works great commit again and push and then it will be merged :) thanks

@DarhkVoyd
Copy link
Contributor Author

@rannn505 I have added the required rule to .eslint config file. I also doubled checked by running cd ts; npm run lint, luckily I did not miss any places so everything works great.

Copy link
Contributor

@RichardAkman RichardAkman left a comment

Choose a reason for hiding this comment

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

Amazing work @DarhkVoyd, we really appreciate your contribution and we can't wait to see your future involvement in our community ⭐ ⭐

@DarhkVoyd
Copy link
Contributor Author

@RichardAkman Thank you! Could you please merge this PR?

@RichardAkman RichardAkman merged commit 2bfd2f9 into configu:main Oct 16, 2023
2 of 3 checks passed
@pelegpor
Copy link
Contributor

Hi @DarhkVoyd , check out the #266 (comment) for details regarding the Hacktoberfest rewards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore General codebase work hacktoberfest-accepted
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use import type instead of import while importing types
5 participants