【发布时间】:2017-07-07 12:57:55
【问题描述】:
我下载了一个包含 Angular2-final 的示例 .NET MVC 应用程序。该项目在根目录中有一个 typings.json,在 ng2 应用程序目录中有一个 tsconfig.json。这两个文件有什么关系?这是否代表了在 VS 中配置 TypeScript 的最新最好的方法?是否需要 typings.json 或者可以配置 tsconfig.json 以涵盖 typings.json 中的功能?这是 tsconfig.json:
{
"compilerOptions": {
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"module": "commonjs",
"noEmitOnError": true,
"noImplicitAny": false,
"outDir": "../Scripts/",
"removeComments": false,
"sourceMap": true,
"target": "es5",
"moduleResolution": "node"
},
"exclude": [
"node_modules",
"typings/index",
"typings/index.d.ts"
]
}
这里是typings.json:
{
"globalDependencies": {
"core-js": "registry:dt/core-js#0.0.0+20160725163759",
"jasmine": "registry:dt/jasmine#2.2.0+20160621224255",
"node": "registry:dt/node#6.0.0+20160909174046"
}
}
【问题讨论】:
标签: javascript .net typescript typescript-typings tsconfig