fix: Represent string literals as single-value unions#106
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #106 +/- ##
==========================================
- Coverage 96.68% 96.29% -0.40%
==========================================
Files 11 11
Lines 845 864 +19
Branches 290 284 -6
==========================================
+ Hits 817 832 +15
- Misses 28 32 +4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
71d9d97 to
219c8ad
Compare
219c8ad to
e739175
Compare
jperals
commented
Jan 14, 2026
| import { extractValueDescriptions } from './extract-value-descriptions'; | ||
|
|
||
| function getOriginalTypeName(rawTypeNode: ts.TypeNode) { | ||
| if (ts.isTypeReferenceNode(rawTypeNode) || ts.isQualifiedName(rawTypeNode)) { |
Member
Author
There was a problem hiding this comment.
I wanted to add a couple comments, like here and here, but the v8 coverage provider would mark the comment lines as uncovered for some reason I could not figure out (might be just a bug in the v8 reporter).
In #107 I experimented with switching to istanbul as coverage provider, but it seems to have other issues (marks import statements as uncovered) and the overall coverage metric drops considerably. So leaving like this for now.
Who-is-PS
approved these changes
Jan 19, 2026
This was referenced Jan 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue:
AWSUI-61577Description of changes:
This allows our documentation to better show the props that have one single possible string as a value, like
variantin Button Group:Current behavior:

New behavior (screenshot from my website pipeline):

Actually, this fix had been already done here but inadvertently reverted in a rewrite here.
Failures in Components and Chart components unit tests are expected, as the Documenter snapshots will differ until they are updated in these packages. I propose to apply this SOP:
2ksIAPIa8aCiBy submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.