Skip to content

Add missing diagnostic message for private method quick fix#63144

Open
drtootsie wants to merge 1 commit intomicrosoft:mainfrom
drtootsie:fix-private-method-diagnostic
Open

Add missing diagnostic message for private method quick fix#63144
drtootsie wants to merge 1 commit intomicrosoft:mainfrom
drtootsie:fix-private-method-diagnostic

Conversation

@drtootsie
Copy link

Fixes #37782

Summary

The code fix logic for adding missing private methods already existed (code 90038), but the diagnostic message was missing from diagnosticMessages.json.

Changes

Added the diagnostic message "Declare private method '{0}'" with code 90038 to enable the quick fix to appear in the IDE.

Testing

The fix can be verified by:

  1. Building the compiler: npm install && npm run build
  2. Creating a test file with a missing private method reference
  3. Confirming the quick fix appears in the IDE

Fixes microsoft#37782

The code fix logic for adding missing private methods already existed
in fixAddMissingMember.ts (code 90038), but the diagnostic message
was missing from diagnosticMessages.json.

Added 'Declare private method {0}' message with code 90038 to enable
the quick fix to appear in the IDE.
@github-project-automation github-project-automation bot moved this to Not started in PR Backlog Feb 15, 2026
@typescript-bot typescript-bot added the For Uncommitted Bug PR for untriaged, rejected, closed or missing bug label Feb 15, 2026
@jakebailey
Copy link
Member

I'm not sure how this would work, our diagnostics generate code which we then reference, if this were all that was needed, the code would not be compiling today.

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

Labels

For Uncommitted Bug PR for untriaged, rejected, closed or missing bug

Projects

Status: Not started

Development

Successfully merging this pull request may close these issues.

'declare method' quick fix for adding a private method

3 participants