| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
@microsoft-github-policy-service agree |
Sorry, something went wrong.
There was a problem hiding this comment.
Explicitly internal type parameters are no longer stripped because their JSDoc is not attached during parsing.
Review effort: Balanced
Findings: 1
Fixes #57352 by refining stripInternal comment handling so unrelated mentions do not remove public declarations.
Changes:
| File | Description |
|---|---|
| tsc/testdata/tests/cases/compiler/stripInternalUnrelatedComments.ts | Adds comment-handling regression cases. |
| tsc/testdata/baselines/reference/compiler/stripInternalUnrelatedComments.js | Records expected declaration output. |
| tsc/internal/transformers/declarations/transform.go | Refines internal-annotation detection. |
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
Sorry, something went wrong.
| for commentRange := range tx.getLeadingCommentRangesOfNode(parseTreeNode, sourceFile) { | ||
| if hasInternalAnnotation(commentRange, sourceFile) { | ||
| return true | ||
| for _, jsdoc := range parseTreeNode.JSDoc(sourceFile) { |
There was a problem hiding this comment.
Addressed in 9b38ed2. Type parameters now attach JSDoc during parsing. The regression baseline confirms that the internal T is stripped while the public U remains. Thanks for catching this.
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Fixes #57352.
An unrelated leading comment mentioning @internal can remove a public
declaration from declaration output.
Check parsed tags in the declaration's existing attached JSDoc instead of
searching arbitrary leading-comment text. Preserve explicit // @internal
and /* @internal */ annotations on the nearest leading comment.
Parameter and parameter-property handling is unchanged.
Add TypeScript and JavaScript regression coverage for unrelated comments,
neighboring members, multiple JSDoc comments, and existing annotation forms.
The regression fails without the production fix and passes with it.
Validation:
tests, and benchmarks passed.
tests: this environment does not support the filesystem handles required
by fanotify-no-rename. The failure reproduces in the unchanged package.
AI disclosure
I used an AI coding assistant to investigate, implement, test, and review this change. I have read and understand the final patch, ran the relevant tests locally, and will handle review feedback myself.