我有一个MVC 5项目,我使用打字稿。 现在我必须实现新功能,我打开其他打字稿的实现方式。 我试图使用typescript 1.8的多个tsconfig.json
文件新功能,我在每个文件夹上有两个文件夹:typescriptE21
和typescript
以及一个tsconfig.json
文件。Visual Studio 2015项目上的多个tsconfig [typescript 1.8]
第一:
{
"compilerOptions": {
"removeComments": false,
"sourceMap": false,
"target": "es5",
"noImplicitAny": false,
"module": "amd",
"declaration": false,
"noEmitOnError": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"inlineSourceMap": true,
"inlineSources": true
},
"compileOnSave": true,
"exclude": [
"node_modules",
"typescript"
]
}
与第二:
{
"compilerOptions": {
"removeComments": false,
"sourceMap": false,
"target": "es5",
"noImplicitAny": false,
"module": "system",
"declaration": false,
"noEmitOnError": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"inlineSourceMap": true,
"inlineSources": true
},
"compileOnSave": true,
"exclude": [
"node_modules",
"typescript21",
"scripts"
]
}
当我打开打字稿部分项目属性说检测到“一个或多个tsconfig.json文件项目属性被禁用。 “这是正确的,但是当我运行该应用程序我得到这个错误:
Build: Experimental support for decorators is a feature that is subject to change in a future release. Set the 'experimentalDecorators' option to remove this warning
上的文件:
import {Component} from "ngts/ngts";
@Component({
template: `<div md-scroll-y flex class="md-padding" id="contenido">Contenido</div>`
})
export class EmAplicacion {
}
在这两个tsconfig.json
文件,我已经激活了装修,但似乎打字稿没有得到从那里的编译器选项...
此外,当我不使用装饰器,它编译,但我可以看到结果文件,他们是使用AMD模块系统,当我已经把“系统”在seco nd配置文件...
什么问题?
你在哪里做这个? 什么文件? – Sam
我在.csproj文件上做。 –