Microsoft/TypeScript

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

Open

#57.640 aperta il 4 mar 2024

Vedi su GitHub
 (9 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

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.

Guida contributor