TypeScript 2.3, the latest version of Microsoft’s typed superset of JavaScript, has moved to a release candidate stage.For standards backing, version 2.3 supports async generators and iterators. “Async iterators are an upcoming ECMAScript feature that allows iterators to produce results asynchronously,” Daniel Rosenwasser, Microsoft program manager for TypeScript, said.

Async generators, meanwhile, can await at any point.[ The art of programming moves rapidly.
InfoWorld helps you navigate what’s running hot and what’s going cold. | Keep up with main topics in programming with InfoWorld’s App Dev Report newsletter. ]

TypeScript 2.3 also offers  down-level iterator and generator support. Previously, generators were not supported when targeting ECMAScript versions 3 or 5. “The new –downlevelIteration flag gives users a model where emit can stay simple for most users, and those in need of general iterator and generator support can opt in,” said Rosenwasser.

TypeScript 2.3 thus makes it easier to use libraries like redux-saga, where support for generators is expected.To read this article in full or to leave a comment, please click here

Leave a Reply