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.

Gary Paluk
  • 1,038
  • 1
  • 14
  • 28
  • Did you even look at the question ? It says explicitly "I would like to use get/set syntax in TypeScript within Visual Studio Express for Web". I didn't flag your question as a duplicate just because I didn't want to offend you - And now you downvote me ? The asnwer I gave you targets Visual Studio Express for Web. – lhk Jun 24 '13 at 17:39

2 Answers2

1

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

Community
  • 1
  • 1
lhk
  • 27,458
  • 30
  • 122
  • 201
0

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

Alain
  • 1