-
Notifications
You must be signed in to change notification settings - Fork 4
fix: display clean string literal values without quotes in docs #101
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
base: main
Are you sure you want to change the base?
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #101 +/- ##
==========================================
+ Coverage 96.68% 96.77% +0.09%
==========================================
Files 11 11
Lines 845 869 +24
Branches 284 297 +13
==========================================
+ Hits 817 841 +24
Misses 28 28 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Expected test is failing. Will follow our SOP once it is released. |
| expect(values).toContain('java'); | ||
|
|
||
| // Should have 'string' representing the intersection type | ||
| expect(values).toContain('string'); |
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.
I don't think that this is a valid representation of the type. For example, if we follow this through to the website, it would suggest that there would be an item "string" in the language selector dropdown, but that is not valid, as it's not a literal value, it's a type. We need to retain that differentiation between literal values and types in the documenter output.
The more that I think about this problem, the more that I think the problem is maybe not actually in the documenter but in the website: the documenter is currently generating output that accurately represents the underlying typings, the website just needs some extra logic to be able to handle some of the edge-cases better
Issue #, if available:
AWSUI-61340Description of changes:
Fixed an issue where
CodeEditorProps.Languagetype values were incorrectly formatted in generated component definitions. TheLiteralUnion<BuiltInLanguage, string>type was not properly recognized as a primitive string type, causing language values to appear as"\"javascript\""instead of"javascript"in the documentation.By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.