TypeScript 3.9 Improves Performance
Written by Kay Ewbank   
Tuesday, 02 June 2020

TypeScript has been updated with improvements to the latest release centred on performance, polish, and stability, according to the development team. The compiler and editing experience have been worked on to improve speed. 

TypeScript is a superset of JavaScript that adds optional static types which can be checked by the TypeScript compiler to catch common errors in your programs.

The developers say they worked on TypeScript's performance after observing extremely poor editing/compilation speed with packages such as material-ui and styled-components. The changes optimize "certain pathological cases involving large unions, intersections, conditional types, and mapped types."

Each of these pull requests gains about a 5-10% reduction in compile times on certain codebases. In total, the team says they've achieved around a 25% reduction the material-ui-styles project’s compile time. They've also been told by teams at Microsoft that TypeScript 3.9 has reduced their compile time from 26 seconds to around 10 seconds.

typescriptlogo

The editor has also received attention, with better handling of CommonJS Auto-Imports in JavaScript. Until now, the assumption was that regardless of your file, you wanted an ECMAScript-style import. TypeScript now automatically detects the types of imports you’re using to keep your file’s style clean and consistent.

In terms of specific features, there are also improvements in Inference and Promise.all. Recent versions of TypeScript have had updates to the declarations of functions like Promise.all and Promise.race, but this has had a side effect of causing problems when used with values with null or undefined. To counter this, the development team has improved the inference process in TypeScript 3.9. They say that if you've been avoiding upgrading your version of TypeScript due to issues around Promises, you should try version 3.9 because it's a lot better.

However, the new awaited type operator the aims to accurately model the way that Promise unwrapping works in JavaScript has not made this build, because testing revealed it wasn't ready.

typescriptlogo

More Information

TypeScript On NuGet

TypeScript On GitHub

Related Articles

TypeScript 3.6 Generators Get Stricter

TypeScript 3.5 Adds Smart Select 

TypeScript 3.2 Gets Stricter Checking

TypeScript 3.1 Adds Mappable Tuples

TypeScript 3.0 Adds Project References 

TypeScript Adds Unused Span Reporting

TypeScript Adds Conditional Types

TypeScript 2.7 Improves Type Inference

TypeScript 2.5 Adds Optional Catch Binding

TypeScript 2.4 Adds Dynamic Import Expressions  

TypeScript 2.3 Released

TypeScript 2.2 Adds More Code Actions

 

To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on, Twitter, Facebook or Linkedin.

Banner


.NET For Apache Spark Updated
05/11/2020

The .NET bindings for Spark have been updated. The new 1.0 version adds support for .NET apps targeting .NET Standard 2.0 or later, as well as support for Apache Spark DataFrame APIs.



Nvidia's AI Supercomputer For Medical Research And Drug Discovery
18/11/2020

Last month Nvidia unveiled plans to build a supercomputer intended for AI research in health care. This prompts us to look at AI's potential role in health care and how it is already being used.

 [ ... ]


More News

square

 



 

Comments




or email your comment to: comments@i-programmer.info

Last Updated ( Tuesday, 02 June 2020 )