typescript intellisense can't find second level index.ts

オープン
#42,604 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
30/100
issue の種類
バグ
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
typescript

調査の方向性

まず、リンクされている2つのリポジトリで動作を再現し、その後、以前の調査については参照されているコメントと issue #42247 を読んでください。TypeScript が index.ts に対する第1階層および第2階層の IntelliSense 提案を提供できるかどうかを判断するか、動作するサポート対象の import パターンを文書化できれば完了です。

索引モデルが issue の本文から書いたものです。

説明

Needs Investigation

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.

主要言語
Go
スター
111k
フォーク
14.4k
平均マージ
1日 19時間
マージ済み PR(30日)
117

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

microsoft/TypeScript のほかの issue

microsoft/TypeScript の issue をすべて見る

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。