Microsoft/TypeScript
Auf GitHub ansehenRedundant "has or is using private name" diagnostic when name not found
Open
#52.033 geöffnet am 27. Dez. 2022
BugDomain: Declaration EmitHelp Wanted
Repository-Metriken
- Stars
- (48.455 Stars)
- PR-Merge-Metriken
- (Durchschn. Merge 6T 17h) (9 gemergte PRs in 30 T)
Beschreibung
Bug Report
🔎 Search Terms
multiple not found declaration redundant using private cannot find name not found
🕗 Version & Regression Information
- This is the behavior in every version I tried, and I reviewed the FAQ for entries about What does the error "Exported variable [name] has or is using private name [name]" mean?
⏯ 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.