`IconNameSubset` duplicate name issue when using multiple icon sets
See original GitHub issueHi, I believe we may have uncovered a potential breaking change while making a switch from 5.0.1 to 5.7.1, or alternatively it may be a misuse from our side.
In our project we have two sets of icons, icons
and brand-icons
. We isolate the two by running different svg-to-ts commands and generating separate files.
this change in v5.6.0 which introduced the IconNameSubset
causes us a bit of an issue is we now have two exported types with the same name.
An unhandled exception occurred: projects/canopy/src/public-api.ts:25:1 - error TS2308: Module './lib/icon/index' has already exported a member named 'IconNameSubset'. Consider explicitly re-exporting to resolve the ambiguity.
There are probably a few things we could to fix it in our project, but I thought I would raise it here first to see if you think it had any validity as a bug. If so I’m happy to raise a PR to try and fix it.
One route would be to provide some kind of cli option to prefix the type in the same way it’s done for the interface name. With a new option a breaking change could be avoided by deferring back to the default if no option is provided, the downside is that it might be a bit of an obscure option.
Issue Analytics
- State:
- Created 3 years ago
- Comments:12 (12 by maintainers)
Top GitHub Comments
Thx a lot for your effort 👍
🎉 This issue has been resolved in version 6.0.0 🎉
The release is available on:
Your semantic-release bot 📦🚀