tsconfig.json
to indicate that the directory is the root of a TypeScript project
to specifie the root files and the compiler options
ここがみやすい?
Project Reference:
... into smaller pieces
例えば、srcとtestフォルダがあり、
testフォルダから、from "../converter"...と参照する。
srcとtestを同時にbuildできない、
implementaion files を変えずに..できない。 implementasion filesはjsにコンパイルされたファイルの事?
You could use multiple tsconfig files to solve some of those problems
2つtsconfiを用意すればよい(src, testに?) が....
2回 tscしないといけないし
tsc -wは2つのconfig見ないし..
Project referenceが解決する
複数のプロジェクト設定
top level propertyで、"references": [{path: ../src/}]
pathは、tsconfig.jsonが含まれる directory
そのdirectory固有の設定が生きる
module importが、そのpathの d.ts を読む
outFileを設定してれば、d.tsのdelcarationが見える
こちらが親切。
includeしてexcludeされる。ので、includeしてもexcludeされたら、される。filesは関係ない。
extendsで、設定ファイル分割、付け足しできる
compilerOptions: 本丸
target:... Babel的な役割部分。被る lib: targetにないものを別途いれたいときに。
outDir: 違う場所に、生成したjavascriptを起きたい場合。
types: どの @types パッケージをコンパイル時にincludeするか