Microsoft/TypeScript

Redundant "has or is using private name" diagnostic when name not found

Open

#52,033 建立於 2022年12月27日

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

倉庫指標

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

描述

Bug Report

🔎 Search Terms

multiple not found declaration redundant using private cannot find name not found

🕗 Version & Regression Information

⏯ Playground Link

Playground link with relevant code

💻 Code

export let value: NotFound = 0;

Note that the declaration compiler option must be enabled.

🙁 Actual behavior

Cannot find name 'NotFound'.
Exported variable 'value' has or is using private name 'NotFound'.

🙂 Expected behavior

Just one of the two errors. "private name" implies the name exists, which is incorrect, so I'd expect just the one that appears when you don't have declaration: true:

Cannot find name 'NotFound'.

Found while working on #52032.

貢獻者指南