Microsoft/TypeScript

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

Ouverte

#54 196 ouverte le 9 mai 2023

 (10 commentaires) (0 réaction) (0 personne assignée)TypeScript (13 395 forks)batch import
BugDomain: ParserHelp Wanted

Métriques du dépôt

Stars
 (108 860 étoiles)
Métriques de merge PR
 (Métriques PR en attente)

Description

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.

Guide contributeur