TypeScript 2.4 Now GA

Dynamic import expressions, enhanced string enums, and improved generics checking are just a few of the features of this point release of the JavaScript superset.

TypeScript 2.4 has emerged from a very short release candidate cycle and this point release sports a bevy of enhancements and capabilities, including dynamic import expressions, enhanced string enums, and improved generics checking, to name a few.

TypeScript is a JavaScript language superset that currently is available to run with Visual Studio 2015 Update 3 and Visual Studio 2017 Update 2. "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," notes Microsoft's Daniel Rosenwasser, in a blog post.

Among the additions to TypeScript 2.4 is support for dynamic import expressions. These expressions, notes Rosenwasser in his blog, are a new feature of coming to ECMAscript 2018. Such expressions allow developers to asynchronously request a module any time during the program's execution. "These modules come back as Promises of the module itself, and can be await-ed in an async function, or can be given a callback with .then," he writes.

Among the enhancements:

  • String enums: Enum members can now contain string initializers.
  • Generic function checking: Version 2.4 improves upon "how types are inferred when generics come into play, as well as improved checking when relating two generic function types," and can now return types as inference targets, as well as offers stricter checking for generics.
  • Callback parameters: TypeScript 2.4 now enforces "the correct directionality on callback parameter type checks" when comparing two function types.
  • Weak types: 2.4 introduces weak types, which are "any type that contains nothing but all-optional properties."

Rosenwasser's blog provides some detailed information on each of these enhancements, and he has additional information for these features in a blog, here, on the release candidate that was made available earlier this month.

About the Author

Michael Domingo is a long-time software publishing veteran, having started up and managed several developer publications for the Clipper compiler, Microsoft Access, and Visual Basic. He's also managed IT pubs for 1105 Media, including Microsoft Certified Professional Magazine and Virtualization Review before landing his current gig as Visual Studio Magazine Editor in Chief. Besides his publishing life, he's a professional photographer, whose work can be found by Googling domingophoto.

comments powered by Disqus


  • .NET Core Ranks High Among Frameworks in New Dev Survey

    .NET Core placed high in a web-dominated ranking of development frameworks published by CodinGame, which provides a tech hiring platform.

  • Here's a One-Stop Shop for .NET 5 Improvements

    Culled from reams of Microsoft documentation, here's a high-level summary of what's new for performance, networking, diagnostics and more, along with links to the nitty-gritty details for those wanting to dig in more.

  • Azure SQL Database Ranked Among Top 3 Databases of 2020

    Microsoft touted the inclusion of Azure SQL Database among the top three databases of 2020 in a popularity ranking by DB-Engines, which collects and manages information about database management systems, updating its lists monthly.

  • Time Tracker Says VS Code Is No. 1 Editor for Devs, Some Working 15+ Hours Per Day

    WakaTime, which does time tracking for programmers, released data for 2020 showing that Visual Studio Code is by far the top editor/IDE used by its coders, some of whom are hacking away for more than 15 hours per day.

Upcoming Events