microsoft / microsoft/TypeScript

Display operator informaton on mouse-over

Ouverte
#40,683 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

Awaiting More Feedback Suggestion
Langage dominant
Go
Étoiles
111k
Forks
14.3k
Merge moyen
1 j 19 h
PR mergées (30 j)
117

Description

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

Guide de contribution

Ouvrir le guide de contribution

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Piste de recherche

Commencez par examiner le comportement de survol demandé pour les opérateurs ainsi que l’issue VS Code associée. Aucun fichier d’implémentation, test ou point d’entrée n’est indiqué ; la première tâche consiste donc à localiser la partie pertinente du service de langage TypeScript. Le travail sera considéré comme terminé lorsque le survol des opérateurs pris en charge affichera une brève explication, des indications d’utilisation et, idéalement, des liens vers la documentation.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
javascript, typescript
Domaine
developer-experience, tooling
Type d'issue
Fonctionnalité
Difficulté
5/5
Temps estimé
Plus d'une semaine
Activité
À l'abandon
Clarté
Plutôt claire
Accessibilité débutants
25/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.