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


  • AI for GitHub Collaboration? Maybe Not So Much

    No doubt GitHub Copilot has been a boon for developers, but AI might not be the best tool for collaboration, according to developers weighing in on a recent social media post from the GitHub team.

  • Visual Studio 2022 Getting VS Code 'Command Palette' Equivalent

    As any Visual Studio Code user knows, the editor's command palette is a powerful tool for getting things done quickly, without having to navigate through menus and dialogs. Now, we learn how an equivalent is coming for Microsoft's flagship Visual Studio IDE, invoked by the same familiar Ctrl+Shift+P keyboard shortcut.

  • .NET 9 Preview 3: 'I've Been Waiting 9 Years for This API!'

    Microsoft's third preview of .NET 9 sees a lot of minor tweaks and fixes with no earth-shaking new functionality, but little things can be important to individual developers.

  • Data Anomaly Detection Using a Neural Autoencoder with C#

    Dr. James McCaffrey of Microsoft Research tackles the process of examining a set of source data to find data items that are different in some way from the majority of the source items.

  • What's New for Python, Java in Visual Studio Code

    Microsoft announced March 2024 updates to its Python and Java extensions for Visual Studio Code, the open source-based, cross-platform code editor that has repeatedly been named the No. 1 tool in major development surveys.

Subscribe on YouTube