TypeScript v3.6 introduces more accurate array spreads & stricter generators
The general release for TypeScript version 3.6 is here! This update includes some new features, breaking changes, and a well-needed refresh for the TypeScript playground. Check out the new features, including stricter generators, more accurate array spreads, better Unicode support for identifiers, improved UX for Promises, and more.
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.
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
__spreadArrayshelper added. View the pull request.
- Refreshed playground: The Playground gets some new toys to play with, with added functionality. New supported options include the
Promiseimprovements: UX improvements for
- Improved Unicode character support in Identifiers
- APIs support
--incrementalflags: 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.