-
Notifications
You must be signed in to change notification settings - Fork 694
Add missing calls to AddSyntheticLeadingComment in node builder #1607
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
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 implements missing calls to AddSyntheticLeadingComment
in the node builder to add /*elided*/
comments to truncated type information. The change enables proper visual indication when types have been elided for readability.
- Replaces commented-out synthetic comment code with actual calls to
AddSyntheticLeadingComment
- Removes unused commented code related to the previous JSDoc rewrite system
- Updates test baselines to reflect the new comment generation behavior
Reviewed Changes
Copilot reviewed 19 out of 21 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
internal/checker/nodebuilderimpl.go | Implements synthetic comment generation for elided types and removes obsolete commented code |
testdata/baselines/reference/submodule/* | Updated test baselines showing /*elided*/ comments now properly generated in TypeScript declarations |
getTags(c: { | ||
- tags(c: /*elided*/ any): /*elided*/ any; | ||
+ tags(c: any): any; | ||
tags(c: /*elided*/ any): /*elided*/ any; | ||
}): { | ||
- tags(c: /*elided*/ any): /*elided*/ any; | ||
+ tags(c: any): any; |
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 am unsure why this is not also fixed.
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
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.
Honestly, kinda surprised we even have this many tests that capture the elision text.
#1599 added these helpers; call them where we previously had them commented out.
I've also removed some commented out code that would have previously used the synthetic comment system, but are not longer needed due to our new JSDoc rewrite.