Microsoft is using the recently released ChakraCore compiler with TypeScript when possible. "We found ChakraCore achieved significantly reduced compilation times, outperforming the previous version of Chakra that we were using by 5-20 percent and Node by 10-50 percent," said Kelly.
A TypeScript NuGet package is provided to improve ease of acquisition. The TypeScript compiler and MSBuild task will be distributed as a NuGet package. "In addition to these official releases, we will also be hosting the nightly build of TypeScript on MyGet," which is a hosted NuGet server on Azure, Kelly said. "These are not supported builds, but feel free to check them out and let us know what you think."
Control flow analysis in the upgrade helps catch common errors, Microsoft said in its GitHub page on TypeScript. In version 1.8 it is also now possible for a type parameter constraint to reference type parameters from the same type parameter list. This capability has been referred to as F-bounded polymorphism and previously was considered an error in TypeScript.
TypeScript 1.8 expands support for JSX, an embeddable XML-like syntax, by enabling custom JSX factories. "While React has paved the way, JSX syntax is not only tied to React. As such, a JSX factory should be able to be overridden from the default React factory. Using the new compiler flag --reactNamespace <factory_name> in combination with --jsx react, TSX authors can now control the emit of the factory name," Kelly said. Also, TypeScript picks up syntax highlighting for JSX from Visual Studio 2015. "With the TypeScript 1.8 update in Visual Studio, JSX tags will now get classified and colorized, improving the readability of the code."
This story, "Microsoft’s TypeScript gets fitted with better compilation" was originally published by InfoWorld.