NuGet users and Visual Studio 2015 users should be aware that with this release and future releases, the team will only be shipping a MSBuild package instead of a standalone compiler package, which will depend on an invokable version of Node.js, according to the company.
Some of the major features of this release include:
To address this, Microsoft added parameter types from TypeScript 2.0 and modeling parameter lists with tuple types in TypeScript 2.0. These enable bind, call and apply to be abstracted accurately without hard coding, the company explained. Combined, the two create strictBindCallApply, which declare stricter versions. However, Rosenwasser explained a caveat of this is that it is not able to fully model generic functions or functions with overloads.
Object spread on generic types
While TypeScript already does a good job of supporting the copying of existing properties from existing objects into a new one known as spreads, it had trouble working with generics. Object spread type now permits spread on generics and models.
Configuration inheritance via node_modules packages
“TypeScript 3.2 now resolves tsconfig.jsons from node_modules. When using a bare path for the ‘extends’ field in tsconfig.json, TypeScript will dive into node_modules packages for us,” Rosenwasser wrote.
TypeScript now recognizes declarations that use Object.defineProperty, giving users better completions and stronger type-checking, Rosenwasser explained.
The release also adds support for printing the implied configuration object to the console with –showConfig and type-checking for BigInt. BigInts are an upcoming proposal for ECMAScript for modeling theoretically large integers. “TypeScript 3.2 brings type-checking for BigInts, as well as support for emitting BigInt literals when targeting esnext,” Rosenwasser wrote.
Other features include fixes to type assertions, missing new keyword, infer types from usage outside of noImplicitAny and infer JSDoc types from usage.
As far as improvements, version 3.2 addresses formatting, editing, narrowing for tagged unions, and error messages.
The team is already working on the next release of the language, which is expected to be released in January. Some things on the roadmap include partial type argument inference and improvements to scaffold out declaration files. The full roadmap is available here.
from SD Times https://ift.tt/2Pcdpm3