Microsoft/TypeScript

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

开放

#57,640 创建于 2024年3月4日

 (9 条评论) (0 个反应) (0 位负责人)TypeScript (13,395 个派生)batch import
BugDomain: ParserHelp Wanted

仓库指标

星标
 (108,860 个星标)
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.

贡献者指南