Our Blogs

TypeScript 2.5 Gets Better With Language Level Refactoring

September 17, 2017
77 Views
TypeScript 2.5 Gets Better With Language Level Refactoring
Microsoft has released TypeScript 2.5 with support for language level refactoring. The Redmond-based software giant has completely focused on developer productivity by offering a wide range of features found in code editors. The TypeScript has provided an ability to perform Extract Function and Extract Method refactorings, which was only made possible via the code.

It is to be noted that TypeScript is a language service and not an editor. According to Daniel Rosenwasser, Program Manager, TypeScript, the product team is completely focused on providing the developer experience and not just the language. The team works on not only the compiler and type checker but also the language service that runs behind Visual Studio. 

Rosenwasser added that the relevant modifications are applied to any editor that consumes the language service. Hence, the newly released features will be useful for a TypeScript user. The refactorings will be visible inside the Visual Studio code and from within the Visual Studio within the next few days.

The highlight of TypeScript 2.5 is the addition of optional catch variables, which helps you to catch an error without worrying about the content. Actually, the feature was part of an ECMAScript proposal. To work with the TypeScript 2.5, you need to pass the command npm install -g typescript or on NuGet.

Microsoft also rectified the accidental usage of JSDoc type declarations and incorrect type referencing. You should note that the quick fix language service API was invoked in TypeScript 2.1 and it ships with features such as spelling, missing imports, unused declarations and missing this. The company revealed that they are planning to infuse more bug fixes in the upcoming releases.