TypeScript 3.6 Now Feature-Complete, Release Candidate Next

Microsoft's open source TypeScript programming language, fresh off cracking the top 10 in a popularity index for the first time, is out in a v3.6 beta that is feature complete, with the release candidate coming next.

Since its debut in 2012, TypeScript's adoption rate has been described as "exploding" and "meteoric" in various indices and articles, driven by its ability to let developers use static typing in JavaScript-based applications.

TypeScript 3.6 is expected to be released near the end of next month, with a release candidate coming soon on the heels of the July 19 beta, described by program manager Daniel Rosenwasser as feature complete.

The TypeScript roadmap includes the following items for TypeScript 3.6:

Here's a summary of Rosenwasser's descriptions of some of the main new features in the TypeScript 3.6 beta:

  • Stricter Generators: "TypeScript 3.6 introduces stricter checking for iterators and generator functions. In earlier versions, users of generators had no way to differentiate whether a value was yielded or returned from a generator."

  • More Accurate Array Spread: This in response to a pull request titled "Add __spreadArrays helper," stating "Adds a __spreadArrays helper for a more accurate spread behavior when not using --downlevelIteration."

    Rosenwasser explained: "In pre-ES2015 targets, the most faithful emit for constructs like for/of loops and array spreads can be a bit heavy. For this reason, TypeScript uses a simpler emit by default that only supports array types, and supports iterating on other types using the --downlevelIteration flag. Under this flag, the emitted code is more accurate, but is much larger.

    "TypeScript 3.6 introduces a new __spreadArrays helper to accurately model what happens in ECMAScript 2015 in older targets outside of --downlevelIteration."

  • Improved UX Around Promises: "Promises are one of the most common ways to work with asynchronous data nowadays. Unfortunately, using a Promise-oriented API can often be confusing for users. TypeScript 3.6 introduces some improvements for when Promises are mis-handled.

    "For example, it's often very common to forget to .then() or await the contents of a Promise before passing it to another function. TypeScript's error messages are now specialized, and inform the user that perhaps they should consider using the await keyword."

  • Semicolon-Aware Code Edits: "Editors like Visual Studio and Visual Studio Code can do automatically apply quick fixes, refactorings, and other transformations like automatically importing values from other modules. These transformations are powered by TypeScript, and older versions of TypeScript unconditionally added semicolons to the end of every statement; unfortunately, this disagreed with many users' style guidelines, and many users were displeased with the editor inserting semicolons.

    "TypeScript is now smart enough to detect whether your file uses semicolons when applying these sorts of edits. If your file generally lacks semicolons, TypeScript won't add one."

In addition to providing code samples and other information for the above, Rosenwasser's post lists several breaking changes affecting DOM updates, constructor naming and the consultation of immediately preceding JSDoc comments to figure out declared types.

The roadmap shows future plans including:

Developers have been clamoring for the poetic presentation of error messages (in haiku or iambic pentameter) for about a year and a half, but Rosenwasser didn't mention that much-discussed PR in his latest post.

About the Author

David Ramel is an editor and writer for Converge360.

comments powered by Disqus


  • AI for GitHub Collaboration? Maybe Not So Much

    No doubt GitHub Copilot has been a boon for developers, but AI might not be the best tool for collaboration, according to developers weighing in on a recent social media post from the GitHub team.

  • Visual Studio 2022 Getting VS Code 'Command Palette' Equivalent

    As any Visual Studio Code user knows, the editor's command palette is a powerful tool for getting things done quickly, without having to navigate through menus and dialogs. Now, we learn how an equivalent is coming for Microsoft's flagship Visual Studio IDE, invoked by the same familiar Ctrl+Shift+P keyboard shortcut.

  • .NET 9 Preview 3: 'I've Been Waiting 9 Years for This API!'

    Microsoft's third preview of .NET 9 sees a lot of minor tweaks and fixes with no earth-shaking new functionality, but little things can be important to individual developers.

  • Data Anomaly Detection Using a Neural Autoencoder with C#

    Dr. James McCaffrey of Microsoft Research tackles the process of examining a set of source data to find data items that are different in some way from the majority of the source items.

  • What's New for Python, Java in Visual Studio Code

    Microsoft announced March 2024 updates to its Python and Java extensions for Visual Studio Code, the open source-based, cross-platform code editor that has repeatedly been named the No. 1 tool in major development surveys.

Subscribe on YouTube