Skip to content

Fix redundant leading apostrophe in TS1344 diagnostic message - #63341

Merged
Ryan Cavanaugh (RyanCavanaugh) merged 3 commits into
mainfrom
copilot/fix-redundant-leading-apostrophe
Apr 2, 2026
Merged

Fix redundant leading apostrophe in TS1344 diagnostic message#63341
Ryan Cavanaugh (RyanCavanaugh) merged 3 commits into
mainfrom
copilot/fix-redundant-leading-apostrophe

Conversation

Copilot AI commented Apr 2, 2026

Copy link
Copy Markdown
Contributor

The TS1344 diagnostic message had a spurious leading ' baked into its key in diagnosticMessages.json, causing the error to render as:

'A label is not allowed here.

instead of:

A label is not allowed here.

Changes

  • src/compiler/diagnosticMessages.json — Remove leading ' from the 1344 message key. The generated identifier A_label_is_not_allowed_here is unaffected; no changes needed in binder.ts or program.ts.
  • 27 baseline test files — Update expected error output to drop the leading '.

Copilot AI changed the title [WIP] Fix redundant leading apostrophe in ts1344 diagnostic Fix redundant leading apostrophe in TS1344 diagnostic message Apr 2, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot revert all changes under /loc and store a memory that you are not allowed to edit this as part of a PR

Agent-Logs-Url: https://github.com/microsoft/TypeScript/sessions/a744264b-2dc7-4e98-ad24-9d62ce1fd801

Co-authored-by: RyanCavanaugh <6685088+RyanCavanaugh@users.noreply.github.com>

Copilot AI commented Apr 2, 2026

Copy link
Copy Markdown
Contributor Author

Copilot revert all changes under /loc and store a memory that you are not allowed to edit this as part of a PR

Done — reverted all changes under src/loc in 700b59f. Also stored a memory to never edit /src/loc files in future PRs.

@RyanCavanaugh
Ryan Cavanaugh (RyanCavanaugh) marked this pull request as ready for review April 2, 2026 16:43
Copilot AI review requested due to automatic review settings April 2, 2026 16:43

@jakebailey Jake Bailey (jakebailey) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow, this has been here since probably forever

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes the user-facing text for diagnostic TS1344 by removing an unintended leading apostrophe that was embedded in the compiler’s diagnostic message source, and updates affected test baselines accordingly.

Changes:

  • Update src/compiler/diagnosticMessages.json to remove the spurious leading ' from the TS1344 message text.
  • Update reference baseline .errors.txt files to match the corrected TS1344 output (no leading apostrophe).

Reviewed changes

Copilot reviewed 29 out of 29 changed files in this pull request and generated no comments.

File Description
src/compiler/diagnosticMessages.json Corrects the TS1344 message text by removing the unintended leading apostrophe.
tests/baselines/reference/*.errors.txt Updates expected diagnostic output for TS1344 to match the corrected message text.

@RyanCavanaugh
Ryan Cavanaugh (RyanCavanaugh) added this pull request to the merge queue Apr 2, 2026
Merged via the queue into main with commit 7b8cb3b Apr 2, 2026
42 of 44 checks passed
@RyanCavanaugh
Ryan Cavanaugh (RyanCavanaugh) deleted the copilot/fix-redundant-leading-apostrophe branch April 2, 2026 17:34
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.

Redundant leading apostrophe in the ts1344 diagnostic

4 participants