microsoft / microsoft/TypeScript
typescript intellisense can't find second level index.ts
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
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
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 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