microsoft / microsoft/TypeScript

Hover documentation for parameters documented with jsdoc renders improperly

オープン
#63,573 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

Experience Enhancement Suggestion
主要言語
Go
スター
111k
フォーク
14.3k
平均マージ
2日 4時間
マージ済み PR(30日)
132

説明

🔎 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)

Image
Issue 2 Image
🙂 Expected behavior
Issue 1

In example 1: The hover for arg should match what it does when there is no hyphen:

Image

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.

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

VS Code で2つの TypeScript/JSDoc の例を再現し、パラメーターのドキュメントに対するホバーのレンダリング経路を調べる。ハイフン付きの説明と折り返された説明を比較する。完了条件は、オプションのハイフンによって意図しない箇条書きが作成されず、折り返された @param テキストが折り返されていないパラメーター説明と同様にレンダリングされること。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
javascript, typescript, vscode
領域
developer-experience, tooling
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
静か
明瞭さ
おおむね明確
初心者へのやさしさ
48/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。