Microsoft/TypeScript

JS | Optional chaining left hand assignment not detected as syntax error.

Offen

#57.640 geöffnet am 04.03.2024

 (9 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)TypeScript (13.395 Forks)batch import
BugDomain: ParserHelp Wanted

Repository-Metriken

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

Beschreibung

Does this issue occur when all extensions are disabled?: Yes/No

  • VS Code Version: 1.86.2
  • OS Version: Windows 11

Steps to Reproduce:

  1. Add this code to a .js file:
let tree = {type: 'none'};
tree?.type = 'apple';
  1. This should be detected as a syntax error. Specifically "Uncaught SyntaxError: Invalid left-hand side in assignment". It is not.

Contributor Guide