Microsoft/TypeScript

The parsed identifier is incomplete due to updateSourceFile.

Open

#60,773 建立於 2024年12月16日

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

倉庫指標

Star
 (48,455 star)
PR 合併指標
 (平均合併 6天 17小時) (30 天內合併 9 個 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

貢獻者指南