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


  • Death of the Dev Machine?

    Here's a takeaway from this week's Ignite 2020 event: An advanced Azure cloud portends the death of the traditional, high-powered dev machine packed with computing, memory and storage components.

  • COVID-19 Is Ignite 2020's Elephant in the Room: 'Frankly, It Sucks'

    As in all things of our new reality, there was no escaping the drastic changes in routine caused by the COVID-19 pandemic during Microsoft's big Ignite 2020 developer/IT pro conference, this week shifted to an online-only event after drawing tens of thousands of in-person attendees in years past.

  • Visual Studio 2019 v16.8 Preview Update Adds Codespaces

    To coincide with the Microsoft Ignite 2020 IT pro/developer event, the Visual Studio dev team shipped a new update, Visual Studio 2019 v16.8 Preview 3.1, with the main attraction being support for cloud-hosted Codespaces, now in a limited beta.

  • Speed Lines Graphic

    New for Blazor: Azure Static Web Apps Support

    With Blazor taking the .NET web development world by storm, one of the first announcements during Microsoft's Ignite 2020 developer/IT event was its new support in Azure Static Web Apps.

  • Entity Framework Core 5 RC1 Is Feature Complete, Ready for Production

    The first release candidate for Entity Framework 5 -- Microsoft's object-database mapper for .NET -- has shipped with a go live license, ready for production.

Upcoming Events