Microsoft Announces TypeScript 3.7 RC

TypeScript 3.7 is bringing Optional Chaining, Nullish Coalescing and sounder support for never-Returning Functions.

Recently, Microsoft announced the release candidate of TypeScript 3.7, featuring Optional Chaining, Nullish Coalescing and Better Support for never-Returning Functions.
 
type_script_3.7 
Source: Microsoft
 
Microsft said that you can expect the final release of TypeScript 3.7 within a couple of weeks.
 
New feature Optional chaining allows you to write code where you can immediately stop running some expressions if you run into a null or undefined. Consider the following code: 
  1. let x = foo?.bar.baz();  
that means when foo is defined, foo.bar.baz() will be computed, but incase foo is null or undefined, it will stop and return undefined.
 
And, the nullish coalescing operator(??) is a feature that goes hand-in-hand with optional chaining. ?? operator is a way to fall-back to a default value when dealing with null or undefined. So if you write a code like: 
  1. let x = foo ?? bar();  
it means the value foo will be used when it’s present; but if it is null or undefined, it will calculate bar() in its place.
 
Other important features, included in 3.7 RC are:
  • Assertion Functions
  • More valid Support for never-Returning Functions
  • (More) Recursive Type Aliases
  • --declaration and --allowJs
  • Build-Free Editing with Project References
  • Uncalled Function Checks
  • // @ts-nocheck in TypeScript Files
  • Breaking Changes: DOM Changes, Function Truthy Checks, Local and Imported Type Declarations Now Conflict and API Changes
To learn more visit the official announcement here.


Next Recommended Reading Microsoft Announces TypeScript 3.2 RC