microsoft / microsoft/TypeScript
`'X' only refers to a type` error in JSDoc comments
Aperta
@gabritto ci sta già lavorando.
Dal 24/7/2024.
Bug
Domain: check: Error Instability
Needs Human Review
Needs More Info
- Lingua principale
- Go
- Stelle
- 111k
- Fork
- 14.4k
- Merge medio
- 1g 19h
- PR unite (30g)
- 117
Descrizione
🔎 Search Terms
- JSDoc
- only refers to a type
@link
🕗 Version & Regression Information
5.6.0-dev.20240723
Not a regression
⏯ Playground Link
No response
💻 Code
When editing JSDoc comments that use @link, I occasionally see errors such as:
'TextDocument' only refers to a type, but is being used as a value here.ts(2693)
This seems to happen most often in larger projects, such as the VS Code codebase
As soon as I make another edit, the error goes away
Attached log shows the error showing up and then going away once an edit is made: tsserver.log
🙁 Actual behavior
Transient errors are occasionally reported. Seems to happen most often when editing jsdoc comments
🙂 Expected behavior
No error. The code is valid
Additional information about the issue
No response
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Valutazione
Questa issue non è ancora stata valutata.