Typescript: 未知的编译器选项“排除”

创建于 2017-05-26  ·  4评论  ·  资料来源: microsoft/TypeScript



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'

最后注
当使用选项includefiles时,也会发生这种情况。 这些选项在最近更新的打字稿中是否贬值? 我找不到任何建议的文件...

Question

最有用的评论

实际上, filesinclude等是顶级字段

{
  "compilerOptions": {},
  "exclude": []
}

所有4条评论

实际上, filesinclude等是顶级字段

{
  "compilerOptions": {},
  "exclude": []
}

@ikatyang谢谢-不敢相信我ed

{
“ compilerOptions”:{
“声明”:是,
“ target”:“ es5”,
“ module”:“ commonjs”,
“ moduleResolution”:“节点”,
“ emitDecoratorMetadata”:是的,
“ experimentalDecorators”:是的,
“ removeComments”:否,
“ noImplicitAny”:否,
“ outDir”:“ dist”,
“ typeRoots”:[
“ ./node_modules/@types/”
]
},
“排除”:[
“ dist”
]
}

此页面是否有帮助?
0 / 5 - 0 等级

相关问题

Zlatkovsky picture Zlatkovsky  ·  3评论

kyasbal-1994 picture kyasbal-1994  ·  3评论

wmaurer picture wmaurer  ·  3评论

jbondc picture jbondc  ·  3评论

manekinekko picture manekinekko  ·  3评论