我有一个MVC 5项目,在那里我使用类型记录。现在我要实现新特性了,我打开了其他类型文本的实现方式。我正在尝试使用多个tsconfig.json文件的新功能的类型记录1.8,我有两个文件夹:typescriptE21和typescript,和一个tsconfig.json文件在每个文件夹。
第一项:
{
"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文件中,我激活了修饰器,但似乎类型记录没有从那里获得编译器选项.
此外,当我不使用装饰器时,它会编译,但我可以看到结果文件,当我将" system“放在第二个配置文件中时,它们是使用AMD模块系统发送的.
有什么问题吗?
发布于 2016-03-03 07:51:04
真正的问题是,tsconfig.json文件包含在prject中,如下所示:
<None Include="typescript\tsconfig.json" />我把它改了;
<Content Include="typescript\tsconfig.json" />一切都没问题
发布于 2016-08-11 06:15:09
这也将有助于:
https://stackoverflow.com/questions/35755272
复制相似问题