Microsoft/TypeScript

Valid JS code reported by TS as illegal code: Keywords cannot contain escape characters

Open

#54.196 geöffnet am 9. Mai 2023

Auf GitHub ansehen
 (10 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)TypeScript (6.726 Forks)batch import
BugDomain: ParserHelp Wanted

Repository-Metriken

Stars
 (48.455 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 6T 17h) (9 gemergte PRs in 30 T)

Beschreibung

Bug Report

🔎 Search Terms

\u{63}onstructor() valid javascript code returns error Keywords cannot contain escape characters escape characters

🕗 Version & Regression Information

  • This is the behavior in every version I tried.

⏯ Playground Link

Playground link with relevant code

💻 Code

class C {
  \u{63}onstructor() {}  // equivalent to: constructor() {}
}

🙁 Actual behavior

Errors in code Keywords cannot contain escape characters.

🙂 Expected behavior

No errors as it is valid javascript code.

Contributor Guide