microsoft / microsoft/TypeScript

typescript intellisense can't find second level index.ts

Abierto
#42,604 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Needs Investigation
Lenguaje dominante
Go
Estrellas
111k
Forks
14.4k
Merge medio
1 d 19 h
PR fusionados (30 d)
117

Descripción

Bug Report

it's reopening of #42247 as tested what was suggested and didn't work, opening it as I didn't get any more comment on that issue

https://github.com/microsoft/TypeScript/issues/42247#issuecomment-758863988

Auto-import assumes that an index.d.ts that re-exports a bunch of stuff is a "barrel" module that intends to provide a facade over an opaque directory hierarchy. So in that case, if you want the deeper path, you'd need to just import "./platform-browser/animations"; instead of re-exporting those members.

I tried @RyanCavanaugh suggestion but look like it doesn't work

🔎 Search Terms
  • index.ts
  • intellisense
🕗 Version & Regression Information
⏯ Playground Link

I created two repos, one following the suggestion and another one with normal index.ts

each repo has a gif showing that IntelliSense doesn't work!

https://github.com/mhamri/vscode-typescript-intellisense-bugs/tree/main/nx-lib-second-level-index-ts

and here is a repo of normal index.ts that still with path doesn't get discovered

https://github.com/mhamri/vscode-typescript-intellisense-bugs/tree/main/nx-lib-first-level-index-ts

🙁 Actual behavior

should get suggestions and IntelliSense for the first level and second level items. or typescript suggests a way that works. atm typescript doesn't give any IntelliSense for any of the second level index.ts for libraries like RxJs , Angular

Please check the original issue, more links to other repos are attached.

🙂 Expected behavior

typescript provides suggestion for the second level items.

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.

Línea de trabajo

Comienza reproduciendo el comportamiento en los dos repositorios enlazados y, después, lee el comentario mencionado y el issue #42247 para conocer la investigación previa. Se considera terminado cuando se determine si TypeScript puede proporcionar sugerencias de IntelliSense de primer y segundo nivel para index.ts, o cuando se documente un patrón de importación compatible que funcione.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
typescript
Área
developer-experience
Tipo de issue
Error
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Estancado
Claridad
Necesita aclaración
Aptitud para principiantes
30/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.