microsoft / microsoft/TypeScript
Hover documentation for parameters documented with jsdoc renders improperly
Personne n'a encore pris cette issue.
- Langage dominant
- Go
- Étoiles
- 111k
- Forks
- 14.3k
- Merge moyen
- 2 j 4 h
- PR mergées (30 j)
- 132
Description
🔎 Search Terms
parameter hover documentation
jsdoc parameter hyphen
jsdoc parameter
vscode jsdoc parameter hover
🕗 Version & Regression Information
- This changed between versions ______ and _______
- This changed in commit or PR _______
- This is the behavior in every version I tried, and I reviewed the entire FAQ for anything that might be related to this
- I was unable to test this on prior versions because this is not a regression in typescript itself, it is a VSCode issue which I know, based on experience, will get moved to this repository.
⏯ Playground Link
Won't show vscode hover, so not worth pasting.
💻 Code
issue 1:
/**
* Foo method
* @param arg - Documentation for arg
*/
function ex1(arg: string) {
return arg;
}
issue 2:
/**
* Foo method
*
* @param arg Documentation for arg but it ends up being long enough that we
* must split it across lines to stay within max column width
* @param arg2 Documentation for arg but it ends up being long enough that we must split it across lines to stay within max column width
*/
function ex2(arg: string) {
return arg;
}
🙁 Actual behavior
Issue 1
The hover doc shows a bullet point when the hyphen is present (note the hover for the method itself renders properly)
Issue 2
🙂 Expected behavior
Issue 1
In example 1: The hover for arg should match what it does when there is no hyphen:
Issue 2:
The description for arg1 should appear exactly as arg2 does.
Additional information about the issue
Issue #61603 identified the first issue, but framed it as a bug related to not supporting TSDoc. Since jsdoc explicitly mentions the optional hyphen, this is not an issue specific to TSdoc. TypeScript support in VSCode should render this properly.
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Piste de recherche
Reproduisez les deux exemples TypeScript/JSDoc dans VS Code et inspectez le chemin de rendu de l'aperçu au survol pour la documentation des paramètres. Comparez les descriptions avec trait d’union et avec retour à la ligne ; le travail est terminé lorsque le trait d’union facultatif ne crée pas de puce involontaire et que le texte @param réparti sur plusieurs lignes est rendu comme la description du paramètre qui ne l’est pas.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- javascript, typescript, vscode
- Domaine
- developer-experience, tooling
- Type d'issue
- Bug
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Activité
- Calme
- Clarté
- Plutôt claire
- Accessibilité débutants
- 48/100