Skip to content

fix jsdoc accessibility modifiers on constructors#4227

Closed
a-tarasyuk wants to merge 0 commit into
microsoft:mainfrom
a-tarasyuk:fix/4219
Closed

fix jsdoc accessibility modifiers on constructors#4227
a-tarasyuk wants to merge 0 commit into
microsoft:mainfrom
a-tarasyuk:fix/4219

Conversation

@a-tarasyuk
Copy link
Copy Markdown
Contributor

@a-tarasyuk a-tarasyuk commented Jun 6, 2026

No description provided.

Copilot AI review requested due to automatic review settings June 6, 2026 15:46
Copy link
Copy Markdown
Contributor

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

Note

Copilot was unable to run its full agentic suite in this review.

Adds conformance coverage and parser support for applying JSDoc visibility tags (@private, @protected, @public) to class constructors in JS-in-TS test fixtures.

Changes:

  • Added new conformance test cases for @private and @protected JSDoc tags on constructors.
  • Updated parser reparse logic to translate those JSDoc tags into constructor visibility modifiers.
  • Added new reference baselines (types/symbols/errors) for both test cases.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
testdata/tests/cases/conformance/jsdoc/jsdocProtectedTag.ts New conformance case: @protected constructor should error on new C()
testdata/tests/cases/conformance/jsdoc/jsdocPrivateTag.ts New conformance case: @private constructor should error on new C()
testdata/baselines/reference/conformance/jsdocProtectedTag.types Baseline for types output of protected-constructor case
testdata/baselines/reference/conformance/jsdocProtectedTag.symbols Baseline for symbols output of protected-constructor case
testdata/baselines/reference/conformance/jsdocProtectedTag.errors.txt Baseline for error output of protected-constructor case
testdata/baselines/reference/conformance/jsdocPrivateTag.types Baseline for types output of private-constructor case
testdata/baselines/reference/conformance/jsdocPrivateTag.symbols Baseline for symbols output of private-constructor case
testdata/baselines/reference/conformance/jsdocPrivateTag.errors.txt Baseline for error output of private-constructor case
internal/parser/reparser.go Teach hosted JSDoc reparsing to apply access modifiers on constructors
internal/ast/ast.go Add setModifiers support for ConstructorDeclaration so reparsing can attach modifiers

Comment thread testdata/baselines/reference/conformance/jsdocProtectedTag.errors.txt Outdated
Comment thread testdata/baselines/reference/conformance/jsdocPrivateTag.errors.txt Outdated
@a-tarasyuk a-tarasyuk closed this Jun 6, 2026
@a-tarasyuk a-tarasyuk deleted the fix/4219 branch June 6, 2026 18:26
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