Introduction
Mainly TypeScript is an enhanced version of JavaScript that includes of classes, in other words an Object Oriented Programming approach that is a very widely used programming technique.
The latest release of TypeScript has some new features in language enhancements. TypeScript 1.3 includes two new features in the language and a new language service for Visual Studio 2015 preview that is built on the .NET Compiler Platform (“Roslyn”), Visual Studio's new language service that provides rich IntelliSense that must help programmers to develop a reliable project. Roslyn makes it much easier to provide a premier editing and alteration experience for TypeScript in Visual Studio as with the other first-class languages in Visual Studio .
Introduction of Protected keyword
As in the old version only public and private keywords are used that is used as Access modifiers but now after the improvements a new keyword is introduced called Protected that means that if a class is made protected than its Subclass can only access the functionality of that class.
A code written below with the use of the Protected keyword in Visual Studio 2013 then the following is what happens:
Now the same code in Visual Studio 2015:
The following describes a faster and more accurate way to find all the references.
This version of TypeScript has the ability to find references faster compared to the older version of TypeScript.
- interface Book
- {
- flag :number;
- }
- var myItem : Item =
- {
- flag :21
- };
- function example (item :item)
- {
- return myItem : flags ;
-
- }
Here we just click or find refrences of myItem.
Enhanced Renaming
In the previous version of Visual Studio it took time to rename in the Refractor tab but now in the recent release it appears in a dialogue box having a reference for the renaming.
Better support for functional programming style
Microsoft has made several changes to ensure that tools work well with various JavaScript coding pattern languages similar to JavaScript such as TypeScript. Specifically, it provides improved support for the functional programming style by improving how the editor works with nested functions. Now "Navigate To" shows nested functions and the navigation bar shows where you are based on your enclosing function scopes.
Enhance List Completion
In this release Microsoft has provided automatic sentence completion for TypeScript as well as is done in C# code. This feature is very important, it saves time for a programmer and projects are completed reliably.
Enhanced outlining
Now this version is released with some interesting features as mentioned above but there is another one that is a big one. Now this feature gives outlining with some refrences. Outlining was also in the older versions but it was not so efficient.
Summary
This article just tries to illustrate some interesting features of TypeScript recently released. Microsoft has made other technologies reliable and TypeScript as well, after getting updates this also becomes very helpful.