get topLeft() { return this._topLeft; }
set topLeft(value) { this._topLeft = value; Recalc(); }
The above code works find in TypeScript Play, but I received build error
when compiling it from Visual Studio 2012 error "exited with code 1"
Does anyone try get,set in TypeScript and build successfully?
You’ll need to target ECMAScript v5, ie pass the
-target ES5argument to the compiler. This needs to be set in the project files target configuration.I don’t know if VS has any built in mechanims for editing target configurations, so i can only tell you how to do it manually. Simply open your
.csprojproject file, look for theTargetnode where the TypeScript compiler command is located, and add the-target ES5argument.In my config it looks like this:
Update
As of version 0.8.1.0, the hardcoded version dependency was removed and support for source maps was added, and so the
Targetnode now looks like this by default:Injecting the
targetargument is still pretty easy, simply put it aftertscor$(TypeScriptSourceMap):