microsoft / microsoft/TypeScript

Display operator informaton on mouse-over

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

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

Awaiting More Feedback Suggestion
主要言語
Go
スター
111k
フォーク
14.4k
平均マージ
1日 19時間
マージ済み PR(30日)
117

説明

Search Terms

operator information definition mouse over hover preview tool-tip

Suggestion

Show a tooltip when hovering over operators like +=, %or ===. The tooltip should explain the operator.

I was told in https://github.com/microsoft/vscode/issues/107046 to apply here.

Use Cases

As a beginner developer, I usually download foreign code to help me understand implementations. Often the more experienced developers use operators I do not know. It would be very helpful if the IDE could show me a short definition of that operator when I hover my mouse over it, similar to how it tells me what a function does. Ideally it also tells me how the operator is called and gives a link to some online documentation.

Examples

When I have code like var x = condition ? 12 : (int?)null; I can hover over ? or : and it shows tool-tip like "Ternary operator: is this condition true ? yes : no".

Or a more simple example: What does x += y do? Hover: "Addition assignment: x = x + y".

Checklist

My suggestion meets these guidelines:

  • [ x] This wouldn't be a breaking change in existing TypeScript/JavaScript code
  • [ x] This wouldn't change the runtime behavior of existing JavaScript code
  • [ x] This could be implemented without emitting different JS based on the types of the expressions
  • [ x] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, etc.)
  • [ x] This feature would agree with the rest of TypeScript's Design Goals.

(To be perfectly honest, I don't really understand all of the above, but I'm guessing yes..)

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

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

はじめの一歩

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

調査の方向性

まず、要求されている演算子のホバー動作と、リンクされている VS Code の issue を確認します。実装ファイル、テスト、エントリーポイントが指定されていないため、最初の作業は関連する TypeScript 言語サービスの領域を見つけることです。対応している演算子にホバーしたときに、簡潔な説明、使用方法のガイダンス、そして可能であればドキュメントへのリンクが表示されれば完了です。

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

評価

技術スタック
javascript, typescript
領域
developer-experience, tooling
issue の種類
機能追加
難易度
5/5
見積もり時間
1週間以上
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
25/100

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

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