0

Visual Studio Express 2012 for Web TypeScript EcmaScript version

I simply want to change the version of EcmaScript from ES3 to ES5 in my TypeScript project. Is there a setting in a dropdown somewhere? The purpose of this is so that I may use the 'get' and 'set' keywords without a compile error and gain ES5 compliance. Alternatively, is there somewhere I can set a compiler flag? That would also be fine if I can send '--target ES5' but I can't find anything in this hunk of carp.

4

2 回答 2

1

这个问题似乎与以下内容重复:Targeting ES5 with TypeScript in Visual Studio

您可以使用编译器标志 -target ES5 将 typescript 编译为 ecmascript 5。在 VisualStudio 中,这可以通过编辑存储编译器目标的 xml 文件来实现。

编辑

于 2013-06-24T09:27:21.833 回答
0

您需要为类型脚本安装 Microsoft 扩展:http: //www.microsoft.com/en-us/download/confirmation.aspx?id=34790

于 2013-09-26T14:54:13.543 回答