TypeScript 3.8 release

TypeScript 3.8 is now available. This version introduces several new features, including new or upcoming ECMAScript standard features and syntax used only for new import / export type, and so on.

ECMAScript private field  

One of the new features ECMAScript is a private field. With the general properties (even using the privatemodifier declaration of property) is different, private fields to keep in mind some of the rules, which include:

  • Dedicated field to #begin with the characters.
  • Each specific fields uniquely qualified class name contained thereon.
  • TypeScript auxiliary function modifier, for example public, privatecan not be used in the private field.
  • Even in private fields outside the class JS users are not included in the access or detected.

In addition to privacy, the benefits of private fields is their uniqueness, each field name to contain the class is unique. 

Other new features include the export * as ns grammar, top-level await, JSDoc property modifiers, a directory on a Linux better surveillance, "Fast and Loose" incremental checks, and so on.

Editor Features

TypeScript 3.8 introduced a new refactorings, string concatenation can be converted into a template string. E.g:

Can be

"I have " + numApples + " apples"

Converted into

`I have ${numApples} apples`

At the same time, this version also introduces a call hierarchy, enabling developers to invoke the function can be visualized. 

On the other hand, TypeScript 3.8 also includes significant changes to some noteworthy, including:

  • Joint signature with an index of more rigorous checks can be allocated
  • No inference optional parameters are correctly marked as implicitly any
  • JSDoc objects under "noImplicityAny" will no longer marked as "any".

Microsoft said, is expected to TypeScript 3.9 will be released in mid-May 2020. This version will mainly focus on performance improvement and possibly smarter Promises type checking. In the next few days, the team will publish plans to file for specific instructions.

More details to see the release notes .

Guess you like

Origin www.oschina.net/news/113592/typescript-3-8-released