microsoft / microsoft/TypeScript
`'X' only refers to a type` error in JSDoc comments
Abierto
@gabritto ya está trabajando en esto.
Desde el 24/7/2024.
Bug
Domain: check: Error Instability
Needs Human Review
Needs More Info
- Lenguaje dominante
- Go
- Estrellas
- 111k
- Forks
- 14.4k
- Merge medio
- 1 d 19 h
- PR fusionados (30 d)
- 117
Descripción
🔎 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
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Evaluación
Este issue todavía no se ha evaluado.