microsoft / microsoft/TypeScript
Feature Request: Update wrong defined import statements?
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
I wonder if there is a feature in vscode to automatically delete imports that are incorrectly defined? Like this:

There is no function named "getData" from "response.ts". Because that function is moved somewhere else within the project. I ask this because incorrectly defined import statements are not deleted automatically by "removeUnusedImports". Because they are used in the file.
In fact, if it could be deleted, then the "addMissingImports" command could do its job and add these imports to the file, so that we could see that the function that was moved in the project was imported from the right place.
PLUS, it would be great if this feature could work when functions are relocated, just like vscode detects when files are relocated and updates the imports. But I am not sure about feasibility of this.
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
Comienza examinando cómo los comandos existentes removeUnusedImports y addMissingImports gestionan los imports cuya función exportada se ha trasladado. Define el comportamiento esperado para los imports definidos incorrectamente y las funciones reubicadas, y luego verifica que la funcionalidad propuesta pueda identificar el nuevo origen correcto sin eliminar imports válidos.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- javascript, typescript
- Área
- tooling
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Estado de actividad
- Estancado
- Claridad
- Necesita aclaración
- Aptitud para principiantes
- 25/100