TypeScriptバージョン: 2.2.3
コード
$ tsc
// tsconfig.json
{
"compilerOptions": {
"declaration": true,
"target": "es5",
"module": "commonjs",
"moduleResolution": "node",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"removeComments": false,
"noImplicitAny": false,
"outDir": "dist",
"typeRoots": [
"./node_modules/@types/"
],
"exclude": [
"dist"
]
}
}
予想される行動:
指定されたパスのリストを除外します。
実際の動作:
エラーをスローします: error TS5023: Unknown compiler option 'exclude'
最後の注意
これは、オプションinclude
またはfiles
を使用する場合にも発生します。 これらのオプションは、typescriptの最近の更新で減価償却されましたか? これを示唆するドキュメントが見つかりません...
実際、 files
、 include
などはトップレベルのフィールドです
{
"compilerOptions": {},
"exclude": []
}
@ikatyangありがとう-私がそれを逃したなんて信じられない🙄
{{
"compilerOptions":{
「宣言」:true、
"ターゲット": "es5"、
"モジュール": "commonjs"、
"moduleResolution": "ノード"、
"emitDecoratorMetadata":true、
「experimentalDecorators」:true、
"removeComments":false、
"noImplicitAny":false、
"outDir": "dist"、
"typeRoots":[
"./node_modules/@types/"
]
}、
「除外」:[
「遠い」
]
}
最も参考になるコメント
実際、
files
、include
などはトップレベルのフィールドです