TypeScript 2.0 is Now Available!

TypeScript, the famous ECMAScript 2015 superset, releases version 2.0.

The main concept behind the open-source project revolves around the idea of simplifying the coding and maintenance of robust applications by applying static typing rather than dynamic typing used by Java Script. Offering support for the latest JavaScript features like async functions and decorators, TypeScript became the main choice for developers looking to build complex and scalable components.


Released in 2012, after two years of internal development at Microsoft, TypeScript, the JavaScript that scales, made it to the top 15 most-used languages on GitHub’s list and is currently the fourth most starred programming language on GitHub. With more than 55,000 pull requests in the past 12 months, Typescript achieved an incredible 250 percent increase in popularity on GitHub. Last month alone, TypeScript had more than 2 million NPM downloads compared to just 275,000 in the same month last year. Recently, the team behind the successful open-source web application framework Angular adopted TypeScript for version 2.1.

TypeScript Downloads

Since its introduction, TypeScript’s team added new features to improve performance, enhance JavaScript compatibility and extend the error checking that the TypeScript compiler performs. Typekit 2.0 is not an exception.

The notable feature in TypeScript 2.0 is non-nullable types. Dubbed as the billion dollar mistake, null is regarded as a fundamental challenge for dynamically compiled languages and, subsequently for JavaScript. Java, C++ or other statically compiled languages perform extensive error-checking every time the developer compiles the code. JavaScript defers all its error checking until a program is run. Subsequently, errors such mathematical operations on non-numerical data have the potentially to go unnoticed until the end user stumbles upon a scenario which invokes the flawed code. TypeScript 2.0 introduces checking and validation that those other languages offer while remaining compatible with JavaScript. In addition, developers can add the option for a new behavior that prevents values from being set to null.

Other significant changes include a new type — called never — which is used for values that never occur, the option to define properties as read-only, private and/or protected class constructors, tagged unions type capability (hello Swift!) etc. The complete list of new features is documented here. Head to the Playground and test them!

TypeScript 2.0 is downloadable for use with Visual Studio 2015 and can be accessed via NPM, using NPM install -g [email protected] Microsoft also offers basic text editor support for Sublime Text, Emacs and, for the hardcore developer, Vim. My favorite text editor, Atom, has a TypeScript Plugin with support for formatting, code completion, navigation and fast compilation. For the Linux enthusiast, the latest version is available with Eclipse IDE.

One Response

  1. Dupré David Sep 23, 7:51 pm