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.
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 address issues with strictness in TypeScript's type system, version 2.3 introduces a
--strict flag to implicitly enable common strictness options. "If you ever need to opt out, you can explicitly turn these options off yourself," said Rosenwasser. The language has options for different levels of strictness, and it's common to begin at the strictest settings so the language can provide the best experience, but the compiler has grown a lot of different options, such as
–noImplicitThis. "Unfortunately if you can't remember these, it just makes TypeScript harder to use," Rosenwasser admitted. Future plans call for possibly including other strict checks that could be manually toggled off.