Microsoft/TypeScript

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

Open

#57,640 opened on 2024年3月4日

GitHub で見る
 (9 comments) (0 reactions) (0 assignees)TypeScript (6,726 forks)batch import
BugDomain: ParserHelp Wanted

Repository metrics

Stars
 (48,455 stars)
PR merge metrics
 (平均マージ 6d 17h) (30d で 9 merged PRs)

説明

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.

コントリビューターガイド