Getting Started With TypeScript 2.0

In this series of articles, we are going to learn TypeScript with all the features of TypeScript 1.x along with TypeScript 2.0. But, before proceeding for details, let’s start with the very first question that always arises in front of all Server-side developers. If all applications will support only JavaScript frameworks like JavaScript, jQuery, and AngularJS etc., what will be the future of Server-side programs?

Well, don’t worry about that. Here is the answer. Microsoft always helps with the new updates in Visual Studio along with new programming languages to support all Microsoft Technology developers. TypeScript is a new language built by Microsoft. So, let’s see more about that.

Q. What is TypeScript?

Answer - As per the official document of TypeScript, TypeScript is an open source programming language and a Super set of JavaScript that compiles to plain JavaScript.

Q. How Does TypeScript Compiler Convert TypeScript to JavaScript?

Answer - TypeScript has its own syntax and types but JavaScript doesn’t. So, TypeScript uses a “transpiler” that converts our TypeScript code (i.e. ES6 + types) to ES5 or ES3 JavaScript code so we can use it in today's browsers.

It is mainly used for making large scale applications in JavaScript. The TypeScript Compiler is itself written in TypeScript. We can write our code in TypeScript syntax and when the .ts code file is saved, it automatically creates a new file into your solution as Code.js; just use this output Code.js file as a Script file reference into your view, like .html file.

If you are a web developer with a rich experience of server side languages like: ASP, ASP.NET, or JSP, you must be familiar with OOPS; but JavaScript is Object Based Script language. Maybe you are not so comfortable with dynamic languages but TypeScript gives you some features with them so you can solve the problem of static type and interfaces, class, inheritance, and many more behaviors of OOPs like we have in C# or Java, to make you feel comfortable.

Q. What are the features of TypeScript?

Answer - TypeScript has lots of features. The important ones are given below.