News

TypeScript Gets Closer To ECMAScript

The release candidate for version 2.3 of the JavaScript-like language adds more support for several ECMAscript features and capabilities, including downlevel generator and iterator support when targeting ES versions 3 and 5.

Just as expected with the new release cadence that the TypeScript team announced a few weeks ago, there's now a new version of TypeScript in release candidate form, this one trotting out a number of new features that get it closer to ECMAScript.

Microsoft's Daniel Rosenwasser notes in a blog about the 2.3 RC that this version as yet does not support Visual Studio 2017, support that is planned for a future release. It currently supports Visual Studio 2015, and it's available as part of the VS 2015 Update 3 installation, as well as via Nuget and via an npm install.

Among the highlights of this release that Rosenwasser points to in his blog is the addition of a --strict flag to the TypeScript type system. TypeScript's type system by default is set to be "as lenient as possible to allow users to add types gradually," he said. By adding the --strict flag to a tsconfig.json file, developers can impose the strictest settings at the outset, and peel back as needed.

Rosenwasser also points to some ECMAScript feature support, by way of the addition of support for downlevel generators and interators and async generators and interators when targeting ES3 and ES5.The downlevel generator support is via the additon of a --downlevelIteration flag that Rosenwasser says "gives users a model where emit can stay simple for most users, and those in need of general iterator & generator support can opt in."

The async generator support is being built in now, in anticipation of support for them in a future version of ECMAScript, says Rosenwasser, which will allow "iterators to to produce results asynchronously." He points to this TC39 proposal on GitHub here that explains the async generator and interator support in detail.

These features are being rolled out now, with more features coming within the next few months. A TypeScript feature roadmap can be viewed here, for those who want to keep apprised of the work the group is doing.

About the Author

Michael Domingo is a long-time software publishing veteran, having started up and managed several developer publications for the Clipper compiler, Microsoft Access, and Visual Basic. He's also managed IT pubs for 1105 Media, including Microsoft Certified Professional Magazine and Virtualization Review before landing his current gig as Visual Studio Magazine Editor in Chief. Besides his publishing life, he's a professional photographer, whose work can be found by Googling domingophoto.

comments powered by Disqus

Featured

  • Hands On: New VS Code Insiders Build Creates Web Page from Image in Seconds

    New Vision support with GitHub Copilot in the latest Visual Studio Code Insiders build takes a user-supplied mockup image and creates a web page from it in seconds, handling all the HTML and CSS.

  • Naive Bayes Regression Using C#

    Dr. James McCaffrey from Microsoft Research presents a complete end-to-end demonstration of the naive Bayes regression technique, where the goal is to predict a single numeric value. Compared to other machine learning regression techniques, naive Bayes regression is usually less accurate, but is simple, easy to implement and customize, works on both large and small datasets, is highly interpretable, and doesn't require tuning any hyperparameters.

  • VS Code Copilot Previews New GPT-4o AI Code Completion Model

    The 4o upgrade includes additional training on more than 275,000 high-quality public repositories in over 30 popular programming languages, said Microsoft-owned GitHub, which created the original "AI pair programmer" years ago.

  • Microsoft's Rust Embrace Continues with Azure SDK Beta

    "Rust's strong type system and ownership model help prevent common programming errors such as null pointer dereferencing and buffer overflows, leading to more secure and stable code."

  • Xcode IDE from Microsoft Archrival Apple Gets Copilot AI

    Just after expanding the reach of its Copilot AI coding assistant to the open-source Eclipse IDE, Microsoft showcased how it's going even further, providing details about a preview version for the Xcode IDE from archrival Apple.

Subscribe on YouTube

Upcoming Training Events