Link tags in line comments are not resolved via TypeScript

Aperta
#3,113 8 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
62/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
typescript
Ambito
documentation

Direzione di ricerca

Inizia in lineLexer.ts e traccia il modo in cui commentStyle impostato su "line" gestisce i target @link. Confronta quel percorso con la risoluzione esistente basata su TypeScript, inclusa la chiamata prevista a getSymbolAtLocation. Il lavoro è completato quando i commenti di riga risolvono link che richiedono TypeScript, come gli import da un pacchetto adiacente incluso nella build.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Search terms

@link line comment useTsLinkResolution

Expected Behavior

If I use line comments for my doc comments, I'd expect TypeScript-driven resolution of @link targets to still work.

Actual Behavior

Only the old, built-in resolution is used in this case.

In fact, the machinery needed to do this seems to be entirely absent from lineLexer.ts. Is this intentional, or an oversight? (If you want, I can look into adding it. In that case, I'd like to know why these lexers exist as completely separate code, rather than being unified, since they seem very similar.)

Steps to reproduce the bug

Set commentStyle to "line", and use a @link that requires TypeScript to resolve (I ran across this trying to reference an import from a sibling package included in the build). TypeDoc will never call getSymbolAtLocation for it, and thus fail to resolve it.

Environment

  • TypeDoc version: 0.28.19
  • TypeScript version: 6.0.3
  • Node.js version: 22.20.0
  • OS: Debian Linux
Lingua principale
TypeScript
Stelle
8.5k
Fork
781
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di TypeStrong/typedoc

Tutte le issue di TypeStrong/typedoc

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.