microsoft / microsoft/TypeScript
Autocomple import ignore rootDirs
まだ誰も着手していません。
- 主要言語
- Go
- スター
- 111k
- フォーク
- 14.4k
- 平均マージ
- 1日 19時間
- マージ済み PR(30日)
- 117
説明
TypeScript Version: 3.3.3333
If you configure in the tsconfig.json a rootDirs section like
{
"compilerOptions": {
"baseUrl": "src",
"rootDirs": [
"src",
"src_gen"
]
}
}
When you try autocomplete an import the subjections ignore what is available in the rootDirs, only show the options available in the same folder of the editing file.
Example
File src/example/example.tsx
import { exampleImport } from './[autocomplete here]'
import { exampleImport2 } from '../[autocomplete here]'
Try to autocomplete after ./, ../, or any subfolder, the displayed options are only the options available in the src folder, but not the options available in the src_gen folder.
Note: No matter the folder's order in the rootDirs sections, the result is the same. The value of the baseUrl option is not important for reproduce this behaviour.
Maybe related to: https://github.com/Microsoft/TypeScript/issues/28550 and https://github.com/Microsoft/TypeScript/issues/30147
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
rootDirs を使用する tsconfig.json の例から始め、./、../、およびサブフォルダーのプレフィックスの後に src/example/example.tsx から表示される自動補完を再現します。src と src_gen の候補を比較し、関連する issue #28550 と #30147 をコンテキストとして使用します。完了条件は、自動補完に rootDirs を通じて利用可能な関連オプションが含まれることです。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- typescript
- 領域
- developer-experience
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- 明確に書かれている
- 初心者へのやさしさ
- 48/100