TypeScript 3.6 Is Available Now

3.6 features stricter generators and more reliable array spread.

Recently, Microsoft announced the latest release of TypeScript i.e TypeScript 3.6., which is a type-checking language that builds on JavaScript by adding optional static types.
 
TypeScript contains tools are used to transform TypeScript code to standards-compliant ECMAScript code that works on any browser or runtime.
 
What’s new in TypeScript 3.6
  • Stricter Generators
  • More reliable array spread
  • Improved UX around promises
  • More useful Unicode support for Identifiers
  • import.meta support in SystemJS
  • get and set accessors in Ambient contexts
  • Ambient classes and functions merge
  • New APIs to support --build and --incremental
  • Semicolon-aware code edits
  • More intelligent auto-imports
The new release has introduced stricter checking for iterators and generator functions. Earlier, for users of generators, there was no way to differentiate whether a value was yielded or returned from a generator.
 
The Iterator type now allows users to specify the yielded type, the returned type, and the type that next can accept. The new Generator type is now an Iterator that always has both the return and throw methods present, and is also iterable.
 
3.6 also features __spreadArrays which is a new helper to accurately model what happens in ECMAScript 2015 in older targets outside of --downlevelIteration.
 
TypeScript 3.6 also enables you to write getters and setters in ambient contexts. And you can now merge ambient classes and functions as well.
  1. declare class Foo {  
  2.     // Allowed in 3.6+.  
  3.     get x(): number;  
  4.     set x(val: number): void;  
  5. }  
To learn more you can visit the official announcement here.
l