microsoft / microsoft/TypeScript
Indicate in the editor that a type is explicitly `any`
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
any marker editor
✅ Viability Checklist
- This wouldn't be a breaking change in existing TypeScript/JavaScript code
- This wouldn't change the runtime behavior of existing JavaScript code
- This could be implemented without emitting different JS based on the types of the expressions
- This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, new syntax sugar for JS, etc.)
- This isn't a request to add a new utility type: https://github.com/microsoft/TypeScript/wiki/No-New-Utility-Types
- This feature would agree with the rest of our Design Goals: https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals
⭐ Suggestion
Types that are explicitly set to any are sometimes hard to distinguish from actually typed variables in the editor. You might be adopting types while still having a lot of any around and then it would be helpful to call any out more explicitly in the editor.
📃 Motivating Example
I am now using the extension https://marketplace.visualstudio.com/items?itemName=danvk.any-xray which does this:
💻 Use Cases
- What do you want to use this for?
Seeing explicit any types easily so that I can work on adding types.
- What shortcomings exist with current approaches?
I can disable explicit any by producing errors but that is very aggressive.
- What workarounds are you using in the meantime?
Hovering over the type.
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
El issue describe una indicación del editor para los tipos any declarados explícitamente y señala la extensión any-xray como referencia. Empieza por rastrear cómo TypeScript expone la información de tipos a los editores y revisar las pruebas relacionadas del editor o del language-service; se considera terminado cuando la indicación prevista está implementada sin cambiar la salida en tiempo de ejecución y está cubierta por pruebas.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- 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
- 35/100