What's new in TypeScript 2.5 RC

Overview of three new features of TypeScript 2.5 RC
21 August 2017   859

TypeScript 2.5 RC was released. Let's see what's inside.

What's news?

Optional catch binding parameters

TypeScript 2.5 introduces a late-stage ECMAScript feature to make the catch binding optional in try/catch statements. That means we can just omit unusedError altogether:

let contents;
try {
    contents = fs.readFileSync('.config_file').toString('utf8');
}
catch {
    // File might not exist, just fall back to some defaults.
    contents = createDefaultContents();
}

Deduplicated and redirected packages

When importing using the Node module resolution strategy in TypeScript 2.5, the compiler will now check whether files originate from “identical” packages. If a file originates from a package with a package.json containing the same name and version fields as a previously encountered package, then TypeScript will redirect itself to the top-most package. This helps resolve problems where two packages might contain identical declarations of classes, but which contain private members that cause them to be structurally incompatible. It also reduces the memory and runtime footprint of the compiler and language service.

The --preserveSymlinks compiler flag

TypeScript 2.5 brings the preserveSymlinks flag, which parallels the behavior of the --preserve-symlinks flag in Node.js. This flag also exhibits the opposite behavior to Webpack’s resolve.symlinks option (i.e. setting TypeScript’s preserveSymlinks to true parallels setting Webpack’s resolve.symlinks to false, and vice-versa).

In this mode, references to modules and packages (e.g. imports and /// <reference type="..." /> directives) are all resolved relative to the location of the symbolic link file, rather than relative to the path that the symbolic link resolves to.

How to install? 

You can get it by NuGet or by the following command with npm

npm install -g typescript@rc

Visual Studio 2015 users with update 3 can get it here, and Visual Studio 2017 users can get it here. Learn more at Microsoft blog.

TIOBE Index for July 2018 Released

Top programming lanuages for July 2018 index released: TypeScript continues to gain popularity 
09 July 2018   185

TypeScript entered the top 50 of the TIOBE index. A month earlier it appeared for the first time in the top 100 on line 93. TS is slowly catching up on the popularity of its competitor Dart from Google and behind it by 26 positions. TIOBE attribute this success to TypeScript with the popularity of the Angular framework, the latest versions of which are written in TS.

Objective-C returned to the top ten, Haskell - in the top 50. The scripting language Lua rose from 36 to 25 places. But F #, flew to the 36th line, losing 19 positions.

TIOBE July 2018 top 20
TIOBE July 2018 top 20

Since this month, two new programming languages have been added to the rating: Chapel and Pony. They took 97 and 173 places respectively.

TIOBE Index July 2018 Trends
TIOBE Index July 2018 Trends

The popularity of JavaScript is still high. All first half of 2018, the language spent in the top 10 and lost only 2 positions in February.

It is important to note that the rating does not show the "best" programming language, but only reflects the interest of IT industry representatives. The authors of TIOBE take into account the number of specialists around the world using a certain language, the number of language courses on educational resources, analyze the popularity of the AP with the help of the search engines of Google, Bing, Wikipedia, Amazon, YouTube, Baidu and others.