Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Don't inherit JSDocs from unrelated base properties onto constructor parameters with the same names#62077

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
Andarist wants to merge1 commit intomicrosoft:main
base:main
Choose a base branch
Loading
fromAndarist:fix/dont-inherit-jsdoc-on-unrelated-params

Conversation

Andarist
Copy link
Contributor

fixes#62069

@CopilotCopilotAI review requested due to automatic review settingsJuly 15, 2025 22:30
@typescript-bottypescript-bot added the For Backlog BugPRs that fix a backlog bug labelJul 15, 2025
Copy link

@CopilotCopilotAI 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 fixes an issue where JSDoc comments from base class properties were incorrectly being inherited by constructor parameters that happened to have the same name. The fix ensures that JSDoc inheritance only occurs for constructor parameters that are actually property declarations (those with accessibility modifiers likepublic,private, orprotected).

  • Modifies the logic infindBaseOfDeclaration to check for accessibility modifiers on constructor parameters
  • Adds a test case to verify that regular constructor parameters don't inherit JSDoc from unrelated base class properties

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

FileDescription
src/services/services.tsUpdates JSDoc inheritance logic to only apply to constructor parameters with accessibility modifiers
tests/cases/fourslash/jsDocDontInheritFromSameNamedPropertyOnParameter1.tsAdds test case verifying constructor parameters don't inherit unrelated JSDoc

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

Copilot code reviewCopilotCopilot left review comments

At least 1 approving review is required to merge this pull request.

Assignees
No one assigned
Labels
For Backlog BugPRs that fix a backlog bug
Projects
Status: Not started
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Derived class constructor parameter incorrectly inherits JSDoc from parent class's field of the same name
2 participants
@Andarist@typescript-bot

[8]ページ先頭

©2009-2025 Movatter.jp