TypeScript 2.4 released

Microsoft released version 2.4 of TypeScript. TypeScript is a strict syntactical superset of JavaScript, and adds optional static typing to the language. TypeScript may be used to develop JavaScript applications for client-side or server-side (Node.js) execution. As TypeScript is a superset of JavaScript, any existing JavaScript programs are also valid TypeScript programs. To get started with the latest stable version of TypeScript, you can grab it through NuGet, or use the following command with npm:

npm install -g typescript

Visual Studio 2015 users (who have Update 3) will be able to get TypeScript by simply installing it from here. Visual Studio 2017 users using Update 2 will be able to get TypeScript 2.4 from this installer.

Built-in support for 2.4 should be coming to other editors very soon, but you can configure Visual Studio Code and our Sublime Text plugin to pick up any other version you need.

Here is the list of new features:

  • Dynamic Import Expressions
    String Enums
  • Improved inference for generics
  • Strict contravariance for callback parameters
  • Weak Type Detection

This page explains al the new features. For a more complete list of features in each iteration of TypeScript, check out this page.