microsoft / microsoft/TypeScript
Display operator informaton on mouse-over
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- Go
- Estrellas
- 111k
- Forks
- 14.4k
- Merge medio
- 1 d 19 h
- PR fusionados (30 d)
- 117
Descripción
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..)
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
Empieza revisando el comportamiento solicitado del hover sobre los operadores y el issue vinculado de VS Code. No se indica ningún archivo de implementación, prueba ni punto de entrada, por lo que la primera tarea es localizar el área relevante del servicio de lenguaje de TypeScript. Se considerará terminado cuando al pasar el cursor sobre los operadores compatibles se muestre una explicación breve, orientación sobre su uso e, idealmente, enlaces a la documentación.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- javascript, typescript
- Área
- developer-experience, tooling
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 25/100