|TypeScript 4.3 Adds Separate Property Write Types|
|Written by Kay Ewbank|
|Tuesday, 15 June 2021|
TypeScript 4.3 has been released with enhancements including separate write types on properties, template string type improvements, and #private support for EMCAScript class elements.
Template string types, which were added recently to TypeScript to provide types that construct new string-like types by concatenating or by matching the patterns of other string-like types, have also received work in this release. The improvements start by changing when TypeScript will infer a template string type. In the new release, when TypeScript sees that you're passing a template string to something that takes a literal type, it will try to give that expression a template type. Another change means that TypeScript is better at relating to and inferring between different template string types.
A third improvement is that TypeScript 4.3 expands which ECMAScript class elements elements can be given #private #names to make them truly private at run-time. In addition to properties, methods and accessors can also be given private names.
Other improvements include changes to the ConstructorParameters type helper so it now works on abstract classes, and smarter type-narrowing logic on generic values. This allows TypeScript to accept more patterns, and sometimes even catch mistakes.
TypeScript 4.3 is available now.
TypeScript 4.2 Release Candidate Available
New TypeScript Website Launched
TypeScript 4.1 Adds Temporal Literal Types
TypeScript 3.6 Generators Get Stricter
TypeScript 3.5 Adds Smart Select
TypeScript 3.2 Gets Stricter Checking
TypeScript 3.1 Adds Mappable Tuples
TypeScript 3.0 Adds Project References
TypeScript Adds Unused Span Reporting
TypeScript Adds Conditional Types
To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on Twitter, Facebook or Linkedin.
or email your comment to: firstname.lastname@example.org