Visual Studio 2015项目上的多个tsconfig[typescript 1.8]
我有一个MVC5项目,在那里我使用typescript。 现在我必须实现新的功能,我打开它的其他类型脚本实现方式。 我正在尝试使用多个Visual Studio 2015项目上的多个tsconfig[typescript 1.8],typescript,typescript1.8,Typescript,Typescript1.8,我有一个MVC5项目,在那里我使用typescript。 现在我必须实现新的功能,我打开它的其他类型脚本实现方式。 我正在尝试使用多个tsconfig.json文件typescript 1.8的新功能,我有两个文件夹:typescriptE21和typescript,每个文件夹上都有一个tsconfig.json文件 第一: { "compilerOptions": { "removeComments": false, "sourceMap": false
tsconfig.json
文件typescript 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"
]
}
当我打开Typescript上的项目属性部分时,会显示“检测到一个或多个tsconfig.json文件。项目属性已禁用”。这是正确的,但当我运行应用程序时,会出现以下错误:
Build:decorators的实验性支持是一项功能,在未来的版本中可能会有所改变。设置“experimentalDecorators”选项以删除此警告
在此文件中:
import {Component} from "ngts/ngts";
@Component({
template: `<div md-scroll-y flex class="md-padding" id="contenido">Contenido</div>`
})
export class EmAplicacion {
}
从“ngts/ngts”导入{Component};
@组成部分({
模板:`Contenido`
})
导出类应用程序{
}
在这两个tsconfig.json
文件中,我都激活了decorators,但typescript似乎没有从中获得编译器选项
此外,当我不使用decorators时,它会编译,但我可以看到结果文件,当我在第二个配置文件中放入“system”时,它们会使用AMD模块系统发出
有什么问题吗 真正的问题是,
tsconfig.json
文件包含在项目中,作为:
<None Include="typescript\tsconfig.json" />
我已经改变了它
<Content Include="typescript\tsconfig.json" />
一切正常这也将有助于:
你在哪里做这个?什么文件?我是用.csproj文件做的。