Web development is inevitable without JavaScript. The developer with Object-Oriented background who works on JavaScript will always find the issue in parsing data because of the dynamic type variable & the variable or function name because JavaScript is strongly typed language. JavaScript does not have a good IntelliSense and it is normally not that easy to find errors at compile time.
If you have experience with JavaScript development, you know that it is neither strongly typed nor object-oriented. Rather JavaScript is a dynamic language that is functional in nature. For the Developer, there can be significant challenges with JavaScript such as defining interfaces and classes, declaring integers, strings and enforcing that integrity. In JavaScript, you can declare a function that does not take arguments and call that function with arguments. Keep in mind Typescript is not a substitution of JavaScript.
Typescript is a free and open-source programming language offering by Microsoft that seeks to change the way you write JavaScript. It is not only used on the Microsoft platform but it can be used anywhere in any environment where there is a need to write JavaScript. With the Typescript, developers can increase their productivity by writing JavaScript code.
Typescript provides features like type safety, type checking at the compilation time and gives the error if any. It gives you type checking, explicit interfaces, and easier module exports. Typescript is the Open Source and under the Apache 2.0 license.
For Visual Studio 2013 update 2+: included by default (also you can download from the website http://www.typescriptlang.org/ download section.)
You can easily install tools with
For Visual Studio 2012: download the tools “TypeScript for Visual Studio 2012”. Other editors like WebStrom, Atom, Sublime Text and Eclipse also provide support for Typescript.
Microsoft does provide great support in Visual Studio for TypeScript, let start with the example project.
In visual studio, with build action, all the typescript file in the project will compile and appropriate js and js.map file generated with the same name. Now build the project the app.js file is created from the app.ts. If you can change anything into the .ts file and save it, automatically it will reflect into js file.
It is recommended to use the latest technology like TypeScript along with ASP.Net MVC to make your DotNet application powerful, scalable and robust.
WRITTEN BY: Parth Patel
Parth Patel is a Microsoft Certified Solution Associate (MCSA) and DotNet Team Lead at CMARIX, a leading Asp.net mvc development company. With 10+ years of…
FEW MORE POSTS BY Parth Patel: