Question

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.

Was it helpful?

Solution

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

OTHER TIPS

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top