What's new in TypeScript 2.5 RC

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

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 February 2019 Index Released

Groove language is in top 20 again; it's popularity increased due to Gradle; Java is 1st
11 February 2019   1159

In February, search engine statistics showed that the dynamically typed Groovy language is gaining popularity again. As analysts of TIOBE noted, it was already in the top twenty of the TIOBE index in 2016 on the wave of interest in the Jenkins system for continuous integration. Now it is pushed forward by the Gradle assembly automation system.

TIOBE Februry 2019 Index
TIOBE Februry 2019 Index

More analysts noticed that the language Hack this month entered the top 50, and TypeScript left it (in their opinion, temporarily). Since February last year, Python and C ++ swapped places, and again topped the list with Java and C.