TypeScript 3.9 Release Candidate Boosts Speed, Editor Functionality

As TypeScript 3.9 approaches general availability in the next couple weeks or so, the new release candidate boasts several speed improvements, along with better code editor functionality and other tweaks.

As the dev team continues its performance, polish and stability push, it has also sped up the compiler and enhanced the editing experience while reducing bugs and crashes.

No less than six different pull requests (PRs) to improve speed are included in the RC update.

"Our team has been focusing on performance after observing extremely poor editing/compilation speed with packages like material-ui and styled-components," said program manager Daniel Rosenwasser in an April 28 blog post. "We've dived deep here, with a series of different pull requests that optimize certain pathological cases involving large unions, intersections, conditional types, and mapped types."

A few of those PRs include:

  • Use objects instead of closures for type mappers
  • Optimize deferred type references
  • Reduce intersections by discriminants

Rosenwasser said that with each PR shortening compile times on specific codebases, the team has achieved about a 40 percent reduction in material-ui's compile time.

The code editing experience -- in Visual Studio 2017/2019, Visual Studio Code and Sublime Text 3 -- for JavaScript has also been improved, as that experience is driven by TypeScript.

Other highlights of the release include:

  • Improvements in Inference and Promise.all: A regression problem caused by updates to the declarations of functions like Promise.all and Promise.race has been fixed.
  • // @ts-expect-error Comments: "When a line is prefixed with a // @ts-expect-error comment, TypeScript will suppress that error from being reported; but if there's no error, TypeScript will report that // @ts-expect-error wasn't necessary."
  • Uncalled Function Checks in Conditional Expressions: A previously introduced feature, uncalled function checks, to report an error when a developer has forgotten to call a function, now works with ternary conditionals (the cond ? trueExpr : falseExpr syntax).

Rosenwasser said in the April 28 post that the stable TypeScript 3.9 release is expected in the next few weeks.

About the Author

David Ramel is an editor and writer for Converge360.

comments powered by Disqus


  • ML.NET Improves Object Detection

    Microsoft improved the object detection capabilities of its ML.NET machine learning framework for .NET developers, adding the ability to train custom models with Model Builder in Visual Studio.

  • More Improvements for VS Code's New Python Language Server

    Microsoft announced more improvements for the new Python language server for Visual Studio Code, Pylance, specializing in rich type information.

  • 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.

Upcoming Events