-
Notifications
You must be signed in to change notification settings - Fork 21
fix(legacy-json): use leftHandAssign in more cases
#525
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
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #525 +/- ##
=======================================
Coverage 79.86% 79.86%
=======================================
Files 121 121
Lines 11995 12011 +16
Branches 839 840 +1
=======================================
+ Hits 9580 9593 +13
- Misses 2412 2415 +3
Partials 3 3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Pull request overview
This PR fixes a double-signature issue in the legacy JSON generator where constructor (ctor) sections were incorrectly nested with sub-signatures. The fix ensures that constructor signature properties are directly merged into the section object rather than wrapped in a signatures array.
Key Changes:
- Added an explicit
case 'ctor'handler that merges signature properties directly into the section object using nullish coalescing assignment - Prevents constructors from having nested "sub-signatures" like methods do
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
leftHandAssign in more cases
ovflowd
left a comment
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.
SGTM!
Previously, a plural of
ctorwas added to the JSON object assignatures. However, eachctorwas treated like a method, which allowed it to have its own sub-signatures.ctorcannot have "sub-signatures". Instead, these are added to the existing section object.Object.assignwith aleftHandAssign, since it was previously overwriting important keys.