microsoft / microsoft/TypeScript

typescript intellisense can't find second level index.ts

Offen
#42,604 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Needs Investigation
Vorherrschende Sprache
Go
Sterne
111k
Forks
14.3k
Ø Merge
2 T. 4 Std.
Gemergte PRs (30 T.)
132

Beschreibung

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.

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Beginne damit, das Verhalten in den beiden verlinkten Repositories zu reproduzieren, und lies anschließend den referenzierten Kommentar sowie Issue #42247 zur vorherigen Untersuchung. Als abgeschlossen gilt die Untersuchung, wenn festgestellt wurde, ob TypeScript IntelliSense-Vorschläge der ersten und zweiten Ebene für index.ts bereitstellen kann, oder wenn ein unterstütztes Importmuster dokumentiert wurde, das funktioniert.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
typescript
Bereich
developer-experience
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Muss geklärt werden
Anfängerfreundlichkeit
30/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.