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 has been done to avoid additional imports in the past, but the solution is not clean.
The users who ran codemod had requested cleaner solution in the past, like #593
The global import was introduced in the past to have as less changes in the code as possible. But as users have used the codemod, they prefer named imports.
Since import equals does not support named imports, that would be an exception to the standard.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread.
Self-service
Problem
If the input code contains only client initialization, the codemod uses named imports as follows:
Example input:
Example output:
However, if the input contains types, the codemod uses global import as follows:
Example input:
Example output:
This has been done to avoid additional imports in the past, but the solution is not clean.
The users who ran codemod had requested cleaner solution in the past, like #593
Solution
Use named imports for types as follows:
Example input:
Example output:
Alternatives
Pass an option to the codemod to enable named import, similar to #589
This will not be straightforward to implement, and users might not discover it.
Additional context
No response
The text was updated successfully, but these errors were encountered: