Microsoft attacks JavaScript scaling with TypeScript

Microsoft is adding yet another langauge — TypeScript — to a roster that already includes Visual Basic, C# and F#. TypeScript is a superset of JavaScript, a language originally meant to build web pages. The goal is to bring more enterprise class features to JavaScript, the use of which has exploded among corporate developers.

The reason? It’s time for the scrappy language to grow up to better support the creation of enterprise applications, according to a blog post by S. Somasegar, corporate VP of Microsoft’s developer division.

Somasegar wrote:

TypeScript is a superset of JavaScript that combines type checking and static analysis, explicit interfaces, and best practices into a single language and compiler. By building on JavaScript, TypeScript keeps you close to the runtime you’re targeting while adding only the syntactic sugar necessary to support large applications and large teams. Importantly, TypeScript enables great tooling experiences for JavaScript development, like those we’ve built for .NET and C++ and continue to innovate on with projects like “Roslyn”. This is true whether you’re writing client-side JavaScript to run on Windows, Internet Explorer, and other browsers and operating systems, or whether you’re writing server-side JavaScript to run on Windows Azure and other servers and clouds.

TypeScript adds static typing to the mix. That means the compiler will flag an issue up front if the developer assigns an incorrect data type to a variable instead of waiting till the program runs, as dynamically typed languages — including JavaScript — do. That delay can lead to problems when the program does run.