feat: migrate @carbon/themes to TypeScript#22166
Conversation
✅ Deploy Preview for v11-carbon-web-components ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for v11-carbon-react ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify project configuration. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #22166 +/- ##
==========================================
- Coverage 95.53% 95.40% -0.14%
==========================================
Files 582 551 -31
Lines 50472 48624 -1848
Branches 6808 6745 -63
==========================================
- Hits 48218 46389 -1829
+ Misses 2121 2110 -11
+ Partials 133 125 -8
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
✅ Deploy Preview for carbon-elements ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
| getTokenSet(name: string) { | ||
| for (const child of this) { | ||
| if (!child.kind === 'TokenSet') { | ||
| // TODO: Is this code necessary given the old code was invalid? |
There was a problem hiding this comment.
You mean because the old condition
if (!child.kind === 'TokenSet') {
was invalid due to child.kind being typecasted to a boolean so this would always be true/false === 'TokenSet', which always resolves as false?
true === 'TokenSet'
// false
false === 'TokenSet'
// also false
There was a problem hiding this comment.
Yea, the boolean conversion breaking the comparison.
7363e14
No issue.
Migrated
@carbon/themesto TypeScript.Changelog
New
@carbon/themesto TypeScript.@carbon/themes.@types/colorto resolve type errors.Testing / Reviewing
Build the package and check the types it emits.
I'm curious to know if anyone has more information about the
TODO. I'm not sure whether I'm missing some context.PR Checklist
As the author of this PR, before marking ready for review, confirm you:
Wrote passing tests that cover this changeMore details can be found in the pull request guide