Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio is not responding while using TypeScript

I am using the typescript. I can create simple typescript samples and run. When i was creating complex type of codes, visual studio becomes not responding.

Can any of you know the reason for this issue? The Performance tab on TaskManager takes approx 35%. Can any of you aware of this issue?

Code i was implemented looks like below,

module myModule{
  export class myClass implements myInterface{
    // code to PartialUpdate, otalUpdate function declarations and 
    // extra properties and methods
  }
  export interface myInterface{
    PartialUpdate:void;
    TotalUpdate:void;
  }
}

Note: Visual Studio becomes not responding while creating code itself, before starting build.

I have used the following extensions:

  • MicroSoft Web Developer Tools,
  • Nuget Package Manager,
  • TypeScript for VS 2012
  • VS Extensions for Windows Library for JavaScript and
  • Web Essentials 2012

And my system config is

  • Processor:Pentium Dual core 2.70GHZ
  • RAM: 4 GB
  • System type: 64 bit
like image 494
Rajagopal 웃 Avatar asked Dec 17 '12 12:12

Rajagopal 웃


People also ask

Does Vscode support TypeScript?

Visual Studio Code includes TypeScript language support but does not include the TypeScript compiler, tsc . You will need to install the TypeScript compiler either globally or in your workspace to transpile TypeScript source code to JavaScript ( tsc HelloWorld. ts ). You can test your install by checking the version.

Can you use TypeScript with C#?

TypeScript is a popular choice for programmers accustomed to other languages with static typing, such as C# and Java. TypeScript's type system offers many of the same benefits, such as better code completion, earlier detection of errors, and clearer communication between parts of your program.


Video Answer


1 Answers

Are you using the latest version of Web Essentials 2012? (2.0 at time of writing) And of TypeScript (0.8.1.1)? I had the same issue with an earlier combination of WE and TS 0.8.1, but it was fixed in a recent release.

WebEssentials can be configured either to compile on save, and/or on build. Go Tools > Options > Web Essentials > TypeScript in VS2012 and try toggling these switches and see if this helps.

Disable Web Essentials, go to the Tools > Options as described above, and try turning off Compile TypeScript on save. This way you can have all the benefits of WE without the performance hit

Update

WE 2012 has just ticked over to the next version: 2.1

like image 199
Jude Fisher Avatar answered Oct 13 '22 13:10

Jude Fisher