microsoft / microsoft/TypeScript

Missing auto-import for subpath imports of other local packages

Abierto
#63,803 6 comentarios 0 reacciones 1 asignado Ver en GitHub

@andrewbranch ya está trabajando en esto.

Desde el 2/4/2026.

Lenguaje dominante
Go
Estrellas
111k
Forks
14.3k
Merge medio
2 d 4 h
PR fusionados (30 d)
132

Descripción

### Extension Version

0.20260303.1

### VS Code Version

1.108

### Operating system Version

Ubuntu 24

### Steps to reproduce

1. Clone example repo https://github.com/psznm/subpath-ts.git
2. npm install
3. try auto-import in main2.ts

### Issue

When using npm workspace local workpaces are linked to node_modules. Subpath imports can then point to that package.
In example repository [package.json](https://github.com/psznm/subpath-ts/blob/master/pkg1/package.json) of pkg1 has various imports specified. #pkg1 and #pkg2 are problematic subpaths specified to their respective packages. #pkg3 and #pkg4 are relative subpaths.

But in [main2.ts](https://github.com/psznm/subpath-ts/blob/master/pkg1/src/nested/nested2/main2.ts) only two autoimports are offered as can be seen in image below. Neither relative, nor package subpath for pkg2 works.

Image

Probably all other subpaths should be offered for auto-import. Or at least one from the other package to cover all unique paths.

Also note that this did not work with strada either. Created this here only [due to this](https://github.com/microsoft/TypeScript/issues/62827)

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.