This article is more than 1 year old

Microsoft nudges latest TypeScript iteration out onto the mean streets of JavaScript

Alright! Variadic tuple types

The TypeScript team has released version 4 of the JavaScript superset to General Availability.

Beloved by those who like a stronger bit of typing in their JavaScript lives, the release brings variadic tuple types and labelled tuple elements. It also supports a new ECMAScript feature to add three new assignment operators: &&=, ||=, and ??= along with a bunch of performance and user experience improvements.

Program manager Daniel Rosenwasser was chuffed at the milestone, insisting: "TypeScript is a core part of many people's JavaScript stack today."

He went on to boast of over 50 million monthly TypeScript downloads on npm in July, a first for the language.

TypeScript has also been clambering up the popularity charts since its 2012 appearance. The most recent Stack Overflow developer survey saw it overhaul Python to take second place in the list of most loved languages.

However, while first-placed Rust saw the percentage of developers already using the language and keen to keep at it increase to 86.1 per cent, TypeScript slipped a little from 73.1 per cent in 2019 to 67.1 per cent in 2020. In 2018 it placed fourth with 67 per cent.

The TIOBE index puts TypeScript near the bottom of the top 50. TIOBE is at pains to point out that its ranking does not reflect the best language.

TypeScript is undoubtedly a handy tool; at its core it type-checks code before spitting out what purports to be clean and readable JavaScript. The static types also make code auto-completion in editors easier to implement and, unsurprisingly, works very well in the likes of Visual Studio Code.

While the team has claimed there are no major breaking changes, those affected have some refactoring ahead. lib.d.ts changes include the removal of document.origin, which will affect those cursed to support old versions of Internet Explorer and Safari. Operands for delete must be optional and TypeScript now issues an error when declaring a property in a derived class that would override a getter or setter in the base class.

Overall, 4.0 is a worthy release if not quite as dramatic as some of the 3.x iterations - a sign that things are becoming more mature, perhaps. The first beta for version 4.1 is due to drop in September and eventually hit general availability in November. ®

More about

More about

More about


Send us news

Other stories you might like