microsoft / microsoft/TypeScript
Display operator informaton on mouse-over
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Go
- Sterne
- 111k
- Forks
- 14.3k
- Ø Merge
- 2 T. 4 Std.
- Gemergte PRs (30 T.)
- 132
Beschreibung
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..)
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne damit, das angeforderte Hover-Verhalten für Operatoren und das verknüpfte VS Code-Issue zu prüfen. Es ist keine Implementierungsdatei, kein Test und kein Einstiegspunkt angegeben, daher besteht die erste Aufgabe darin, den relevanten Bereich des TypeScript-Sprachdienstes zu finden. Als abgeschlossen gilt die Aufgabe, wenn das Hovering über unterstützten Operatoren eine kurze Erklärung, Hinweise zur Verwendung und idealerweise Dokumentationslinks anzeigt.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- javascript, typescript
- Bereich
- developer-experience, tooling
- Issue-Typ
- Feature
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 25/100