Skip to content

Redundant leading apostrophe in the ts1344 diagnosticΒ #63340

@JLHwung

Description

@JLHwung

πŸ”Ž Search Terms

ts1344

πŸ•— Version & Regression Information

  • This is the behavior in every version I tried, and I reviewed the FAQ for entries about Common "Bugs" That Aren't Bugs

⏯ Playground Link

https://www.typescriptlang.org/play/?lib=lib.es5.d.ts&ts=lib.es5.d.ts#code/EQVwzgpgBGAuBOBLAxrYAoANgQwEYUwC4oAzEAO1UQHtzTyAKASigG8oBfIA

πŸ’» Code

"use strict"
label: function fn() { }

πŸ™ Actual behavior

It prints the ts1344 diagnostic

'A label is not allowed here.

πŸ™‚ Expected behavior

It should print

A label is not allowed here.

The leading ' is redundant, likely due to an unclosed single quote string later wrapped in doublequotes.

Additional information about the issue

No response

Metadata

Metadata

Labels

BugA bug in TypeScript

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions