microsoft / microsoft/TypeScript
typescript intellisense can't find second level index.ts
Nessuno ha ancora preso questa issue.
- Lingua principale
- Go
- Stelle
- 111k
- Fork
- 14.3k
- Merge medio
- 2g 4h
- PR unite (30g)
- 132
Descrizione
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.
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia riproducendo il comportamento nei due repository collegati, quindi leggi il commento indicato e l’issue #42247 per conoscere l’indagine precedente. Il lavoro è completato quando viene determinato se TypeScript può fornire suggerimenti IntelliSense di primo e secondo livello per index.ts, oppure quando viene documentato un pattern di importazione supportato e funzionante.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- typescript
- Ambito
- developer-experience
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 30/100