microsoft / microsoft/TypeScript

`references` are not inherited in `tsconfig.json`

オープン
#27,098 コメント 21 件 リアクション 66 件 担当者 1 名 GitHub で見る

@RyanCavanaugh がすでに取り組んでいます。

2018年12月14日 から。

Docs
主要言語
Go
スター
111k
フォーク
14.3k
平均マージ
2日 4時間
マージ済み PR(30日)
132

説明

TypeScript Version: 3.1.0-dev.20180914

Search Terms: tsconfig.json extends references inheritance

It seems that the references key is not inherited via the extends mechanism, which surprised me because the handbook doesn't mention anything special about it.

Demo:

tsconfig.base.json:

{
  "references": [
    { "path": "./some/other/project" }
  ],
  "compilerOptions": {
    "declaration": true,
    "composite": true
  }
}

tsconfig.doesnt-work.json:

{
  "extends": "./tsconfig.base.json"
}

Building tsconfig.doesnt-work.json doesn't build the reference:

$ tsc -b -f -d tsconfig.doesnt-work.json
[11:12:13] A non-dry build would build project 'C:/demo/tsconfig.doesnt-work.json'

tsconfig.works-but-duplicates-references.json:

{
  "extends": "./tsconfig.base.json",
  "references": [
    { "path": "./some/other/project" }
  ],
}

This is a correct build but I had to duplicate the references key:

$ tsc -b -f -d tsconfig.works-but-duplicates-references.json
[11:12:13] A non-dry build would build project 'C:/demo/tsconfig.works-but-duplicates-references.json'
[11:12:13] A non-dry build would build project 'C:/demo/some/other/project/tsconfig.json'

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

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

はじめの一歩

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

評価

この issue はまだ評価されていません。

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

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