days
-4
-5
hours
0
-2
minutes
-3
-2
seconds
-2
-1
search
No more slowdown

TypeScript 3.5 release candidate fixes speed regressions & adds improvements

Sarah Schlothauer
typescript
© Shutterstock / BigBlueStudio

The latest release candidate for TypeScript is now available: TypeScript 3.5 RC. This release fixes a previous problem in TypeScript 3.4 regarding speed regressions. It also introduces some new improvements, optimizations, and features, including the Omit helper type.

On May 16, 2019, Microsoft announced the availability of the latest TypeScript release candidate: 3.5 RC. This release candidate fixes some previous issues, introduces new improvements, performance optimizations, and adds a few features.

TypeScript recently moved up the ladder in ThoughtWorks’ Technology Radar report and according to RedMonk’s quarterly report, has gained a significant amount of popularity.

Jump in and see what’s new and improved.

Slowdown no more

This release fixes a previous issue which caused large amounts of slowdown in build times. 3.5 RC optimizes code paths for improved speed and faster compile times.

From the release announcement:

Much of the expressivity of our type system comes with a cost – any more work that we expect the compiler to do translates to longer compile times. Unfortunately, as part of a bug fix in TypeScript 3.4 we accidentally introduced a regression that could lead to an explosion in how much work the type-checker did, and in turn, type-checking time. The most-impacted set of users were those using the styled-components library. This regression was serious not just because it led to much higher build times for TypeScript code, but because editor operations for both TypeScript and JavaScript users became unbearably slow.

SEE ALSO: JAX DevOps 2019 takeaways: Security pitfalls and how to influence DevOps culture

The developer team recommends upgrading and requests feedback on whether this optimization addresses developers’ previous speed concerns with v3.4. According to the dev team, this optimization makes v3.4RC even faster than v3.3.

New additions

TypeScript 3.4 release candidate adds several new additions that will potentially be in the final release:

  • Omit helper type: Previously, users were defining Omit on their own when they needed to omit certain properties in an object. Pull requests on GitHub asked for this feature to be added to the new release and for TypeScript to use Omit for object rest instead of Pick<T, Exclude<keyof T, "a" | "b">>.  Here is an example of what this new helper type looks like in action: typescript
  • Excess property checking feature changes: The excess property checking feature undergoes a change regarding previously allowed incorrect properties that will now no longer be permitted. Now the properties will undergo verification for confirmed validity.
  • New --allowUmdGlobalAccess flag: Reference UMD global declarations from “anywhere – even modules”.
  • Union type checking changes: See the pull request “Relate source types covered by a target discriminated union” for more info.
  • Support added for higher order inferences for constructor functions: New, improved inference. The pull request on GitHub goes into detail about this change’s purpose.

SEE ALSO: Everything you need to know about serverless: What does the future hold?

The release candidate also comes with various breaking changes to be aware of. Make sure upgrading to the new release candidate doesn’t break your code!

Update to 3.5RC

Find this latest release here through NuGet.

Since this is a release candidate, the developer team awaits early feedback and any potential issues. Help ensure a bug-free final version by offering any relevant comments.

Furthermore, according to the dev team, TypeScript 3.5 should arrive by the end of May, 2019!

Author
Sarah Schlothauer

Sarah Schlothauer

All Posts by Sarah Schlothauer

Sarah Schlothauer is an assistant editor for JAXenter.com. She received her Bachelor's degree from Monmouth University and is currently enrolled at Goethe University in Frankfurt, Germany where she is working on her Masters. She lives in Frankfurt with her husband and cat.

Leave a Reply

Be the First to Comment!

avatar
400
  Subscribe  
Notify of