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.
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.

Quick fixes for Promises. Source.
- 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
View the fixed issues query for v3.62, v3.6.1, and v3.6.0.
The following are the breaking changes and removed/changed declarations to take note of:
- String-named methods change: Class declarations with methods named
constructor
now will be constructor functions, as per ECMAScript specifications. - DOM removals: Removed declarations within
lib.dom.d.ts
. : Users must now use WindowOrWorkerGlobalScope instead of GlobalFetch. Non-standard properties onNavigator
removed.experimental-webgl
context removed; usewebgl
orwebgl2
. - No more merging JSDoc comments
- Keywords no longer allowed to contain escape sequences
Looking towards the future
What’s next? Refer to the roadmap overview on GitHub and catch a preview of upcoming features and high-level goals. As of right now, the team is focusing on the following 5 goals for future releases:
SEE ALSO: Small embeddable JavaScript engine with QuickJS
- Types on every desk, in every home, for every JS developer
- Productivity through strong tooling
- Approachability and UX
- Community engagement
- Infrastructure and engineering systems
Support for editors beyond Visual Studio Code will also arrive in future updates, according to the Microsoft dev blog.