Microsoft/TypeScript

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

Open

#52 033 ouverte le 27 déc. 2022

Voir sur GitHub
 (0 commentaires) (0 réactions) (0 assignés)TypeScript (6 726 forks)batch import
BugDomain: Declaration EmitHelp Wanted

Métriques du dépôt

Stars
 (48 455 stars)
Métriques de merge PR
 (Merge moyen 6j 17h) (9 PRs mergées en 30 j)

Description

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.

Guide contributeur