Microsoft/TypeScript

The parsed identifier is incomplete due to updateSourceFile.

开放

#60,773 创建于 2024年12月16日

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

仓库指标

星标
 (108,860 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

🔎 Search Terms

updateSourceFile

🕗 Version & Regression Information

5.6.0

⏯ Playground Link

No response

💻 Code

// Your code here

🙁 Actual behavior

class Test { testMethod() { let newLocal = "kk" let a = 123 let b = 12 } } After the value of variable b is changed, the identifiers set of sourceFile parsed by the updateSourceFile method contains only Test, testMethod, and b. Variables a and newLocal are lost.

🙂 Expected behavior

the identifiers set of sourceFile contains Test, testMethod, b, a and newLocal.

Additional information about the issue

No response

贡献者指南