Microsoft/TypeScript

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

Open

#54.196 aperta il 9 mag 2023

Vedi su GitHub
 (10 commenti) (0 reazioni) (0 assegnatari)TypeScript (6726 fork)batch import
BugDomain: ParserHelp Wanted

Metriche repository

Star
 (48.455 star)
Metriche merge PR
 (Merge medio 6g 17h) (9 PR mergiate in 30 g)

Descrizione

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.

Guida contributor