Skip to content

Conversation

jakebailey
Copy link
Member

#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.

Copy link
Contributor

@Copilot Copilot AI left a 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;
Copy link
Member Author

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.

Copy link
Member

@weswigham weswigham left a 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.

@jakebailey jakebailey added this pull request to the merge queue Aug 19, 2025
Merged via the queue into main with commit d604acb Aug 19, 2025
22 checks passed
@jakebailey jakebailey deleted the jabaile/synthetic-leading-fixes branch August 19, 2025 22:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants