Ability to extend compilerOptions's paths config

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

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

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
静か
技術スタック
typescript
領域
compilers

調査の方向性

ソースファイルもテストも指定されていません。まず、compilerOptions.paths が tsconfig.base.json からプロジェクトの tsconfig.json にどのように継承されるかを追跡し、期待されるマージセマンティクスについて issue の議論を確認してください。継承されたパスマッピングが引き続き利用でき、ベース設定を繰り返さずにプロジェクト固有のマッピングを追加できれば完了です。

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

説明

Awaiting More Feedback Suggestion

Suggestion

I have a tsconfig.base.json file for the monorepo, it defined paths that all project can use

{
  "compileOnSave": false,
  "compilerOptions": {
    ```
    "paths": {
      "@aegis/ui": ["libs/ui/src/index.ts"],
      "@aegis/ui/*": ["libs/ui/src/*"],
      "@aegis/shared": ["libs/shared/src/index.ts"],
      "@aegis/shared/*": ["libs/shared/src/*"]
    }
  },
  "exclude": ["node_modules", "tmp"]
}

Each project has own tsconfig.json, also defined paths that only for itself

{
  "extends": "../../tsconfig.base.json",
  "compilerOptions": {
    "paths": {
      "@environment": ["src/environments/environment.ts"]
    }
  },
  "files": [],
  "include": [],
  "references": [
    {
      "path": "./tsconfig.app.json"
    },
    {
      "path": "./tsconfig.spec.json"
    },
    {
      "path": "./tsconfig.editor.json"
    }
  ]
}

Unfortunately, the paths would be overwritten.

I have to add tsconfig.base.json paths item to each project.

So, it's necessary to provide a solution for this case.

🔍 Search Terms

  • compilerOptions paths extends label:Suggestion

List of keywords you searched for before creating this issue. Write them down here so that others can find this suggestion more easily and help provide feedback.

主要言語
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 を短くまとめたダイジェスト。