TypeScript continues to add quality of life improvements for JavaScript developers. Many JS devs turn to TypeScript for modern improvements upon programming in JavaScript. TypeScript builds upon JS by adding optional static types, compiling to plain JavaScript.
A new update arrives, adding stricter generators, more accurate array spreads, improved UX, better Unicode support for identifiers, a few breaking changes, and more. TypeScript 3.6 is out of its beta phase and hit general availability, as of August 28, 2019.
Grab the latest beta via npm, Visual Studio, or NuGet.
TypeScript 3.6 is now out!
Read up on better generator checking, better UX around Promises, editing improvements, a new TypeScript playground, and more! https://t.co/32PNpbxfoA
— TypeScript (@typescript) August 28, 2019
TypeScript version 3.6 features
Let’s review some of the key changes in this release:
- Stricter Generators: New, stricter checking for iterators and generator functions. From the Microsoft dev blog: “…what this means is that you’ll be able to appropriately narrow down values from iterators when dealing with them directly.” Check out the pull request to learn more about this change.
- Array spread emits more accurate code: New
__spreadArrays
helper added. View the pull request. - Refreshed playground: The Playground gets some new toys to play with, with added functionality. New supported options include the
target
option, strictness flags, support for plain JavaScript files, and more. Promise
improvements: UX improvements forPromise
added.
- Improved Unicode character support in Identifiers
- APIs support
--build
and--incremental
flags: Two sets of APIs operate on project references and incremental program building. See the pull request for more info. - Smart semicolon-aware edits: TypeScript detects if your file uses semicolons before writing from TextChanges. Files that do not have any semicolons will not receive any, keeping consistent with user guidelines.
- Improved auto-imports: Auto-imports are now better at looking at existing imports and deciding how to auto-import modules, making them more likely to be valid.
Fixed issues & breaking changes
As with any new release, version 3.6 comes with some breaking changes, removed/changed declarations, and fixes a few pesky bugs.
SEE ALSO: What do top DevOps performers have in common? Tips for elite performance
Source : JAXenter