|TypeScript 2.0 Adds Null, Undefined And Never|
|Friday, 23 September 2016|
TypeScript 2.0 has been released with support for new data types including Null and Undefined.
One change to the new version is support for two special types, Null and Undefined, that (strangely enough) have the values
A new strict null checking mode, removes the
The support for types has also been increased with the implementation of a control flow-based type analysis for local variables and parameters. In earlier versions type analysis was limited to If statements. In the new version the type checker analyses all possible flows of control in statements and expressions to produce the most specific type possible (the narrowed type) at any given location for a local variable or parameter that is declared to have a union type.
A new primitive type has also been added in this version, the never type. As the release notes say:
"This represents the type of values that never occur. Specifically,
On a more positive note, Glob support has been added to tsconfig.json. This has been one of the most requested features, according to the developers, partially because of the number of third party tools have now support tsconfig.json, most of which support some sort of extension to tsconfig.json that supports file globs.The addition within TypeScript itself regularises the situation.
or email your comment to: email@example.com
|Last Updated ( Friday, 23 September 2016 )|