문제

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.

도움이 되었습니까?

해결책

This question seems like a duplicate of: Targeting ES5 with TypeScript in Visual Studio

You can use the compiler flag -target ES5 to compile typescript to ecmascript 5. In VisualStudio this is possible by editing the xml file which stores the compiler target.

edit

다른 팁

You will need to install the Microsoft Extension for type script : http://www.microsoft.com/en-us/download/confirmation.aspx?id=34790

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top