-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Add TypeScript types for @carbon/icons
#13143
Comments
@carbon/icons
I did some research on this + a bit of (mostly unsuccessful) experiments. What I've been successful with is I've been able to convert the Icon.js file into Icon.tsx and get it properly recognized and transformed by @carbon/icon-build-helpers (with a bit of babel configs tuning) to produce JS code. This means that we at least have some TS source to generate TS definitions for the base Icon type. The bad news is, @carbon/icon-build-helpers uses rollup virtual plugin, which is not supported by the rollup typescript plugin: rollup/plugins#567. Therefore, we don't get any TS definitions (even for the aforementioned base Icon component) directly out of the build process. Even if we could feed virtual code into rollup typescript plugin, we'd get the definitions for base types only, and not for the generated JS code (or the definitions would be useless). Based on the above, I see 2 options:
@tay1orjones any suggestions / thoughts? |
@carbon/icons
@carbon/icons
Thank you for submitting a feature request. Your proposal is open and will soon be triaged by the Carbon team. |
Since
@carbon/icons-angular
package is outdated and no longer maintained, I'm trying to use@carbon/icons
package in my Angular project. Unfortunately, Angular complains that types are missing. It would be great to have them added.The text was updated successfully, but these errors were encountered: