-
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
fix(icons-react): fix exports in individual icon TypeScript declarations #15032
fix(icons-react): fix exports in individual icon TypeScript declarations #15032
Conversation
@metonym FYI. |
✅ Deploy Preview for v11-carbon-react ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for carbon-elements ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
m.name + | ||
': CarbonIconType;\n'; | ||
`const ${m.name}: CarbonIconType;\n` + | ||
`export default ${m.name}\n`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@metonym thanks for spotting! I added the missing declare keyword and it seems to be better now. Please confirm if this also helps in your setup.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
m.name + | ||
': CarbonIconType;\n'; | ||
`const ${m.name}: CarbonIconType;\n` + | ||
`export default ${m.name}\n`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
…ons (#15032) * fix(icons-react): fix exports in individual icon TypeScript declarations * fix(icon-build-helpers): add missing declare keyword in TS builder --------- Co-authored-by: TJ Egan <[email protected]>
…ons (carbon-design-system#15032) * fix(icons-react): fix exports in individual icon TypeScript declarations * fix(icon-build-helpers): add missing declare keyword in TS builder --------- Co-authored-by: TJ Egan <[email protected]>
Fixes the problem raised in #14714 (comment): improper typescript type exports in individual icons TypeScript declaration file (.d.ts).
Changelog
Changed
Testing / Reviewing
Tested in TypeScript project by linking the patched Carbon version. Can import individual icon using default import.