Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8648119
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T13:14:27+00:00 2026-06-12T13:14:27+00:00

get topLeft() { return this._topLeft; } set topLeft(value) { this._topLeft = value; Recalc(); }

  • 0
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?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T13:14:28+00:00Added an answer on June 12, 2026 at 1:14 pm

    You’ll need to target ECMAScript v5, ie pass the -target ES5 argument 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 .csproj project file, look for the Target node where the TypeScript compiler command is located, and add the -target ES5 argument.

    In my config it looks like this:

    <Target Name="BeforeBuild">
        <Exec Command="&quot;$(PROGRAMFILES)\Microsoft SDKs\TypeScript\0.8.0.0\tsc&quot; -target ES5 @(TypeScriptCompile ->'&quot;%(fullpath)&quot;', ' ')" />
    </Target>
    

    Update

    As of version 0.8.1.0, the hardcoded version dependency was removed and support for source maps was added, and so the Target node now looks like this by default:

    <Target Name="BeforeBuild">
        <Message Text="Compiling TypeScript files" />
        <Message Text="Executing tsc$(TypeScriptSourceMap) @(TypeScriptCompile ->'&quot;%(fullpath)&quot;', ' ')" />
        <Exec Command="tsc$(TypeScriptSourceMap) @(TypeScriptCompile ->'&quot;%(fullpath)&quot;', ' ')" />
    </Target>
    

    Injecting the target argument is still pretty easy, simply put it after tsc or $(TypeScriptSourceMap):

    <Message Text="Executing tsc --target ES5 $(TypeScriptSourceMap) @(TypeScriptCompile ->'&quot;%(fullpath)&quot;', ' ')" />
    <Exec Command="tsc --target ES5 $(TypeScriptSourceMap) @(TypeScriptCompile ->'&quot;%(fullpath)&quot;', ' ')" />
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've been trying to get this snippet of python code to work, but to
this code compiles in Linux but not Solaris, because apparently ppoll() is Linux specific
The get works fine and able to post to the database with a test
I get Compiler Error C2248 when i try to compile the following code: #include
I get the following error even when my JAVA_HOME is set correctly. C:\workspace-sts-2.8.0.RELEASE\JBClient\target>echo %JAVA_HOME%
I was trying to draw a shaded triangle, but I get wrong colors. Here's
I'm having this function and I need to get coordinates to a structure. These
Currently I use this to find a bitmap that occurs in another image on
I'm trying to create simple Ajax call, but after clicking the link I get
This is what I am currently doing: get window DC via GetWindowDC create a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.