Microsoft/TypeScript

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

Open

#57,640 建立於 2024年3月4日

在 GitHub 查看
 (9 留言) (0 反應) (0 負責人)TypeScript (6,726 fork)batch import
BugDomain: ParserHelp Wanted

倉庫指標

Star
 (48,455 star)
PR 合併指標
 (平均合併 6天 17小時) (30 天內合併 9 個 PR)

描述

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.

貢獻者指南