TypeScript 3.5 release candidate fixes speed regressions & adds improvements

Share

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

The post TypeScript 3.5 release candidate fixes speed regressions & adds improvements appeared first on JAXenter.

Source : JAXenter