Microsoft emphasizes JavaScript tools, libraries in TypeScript 2.0

Microsoft emphasizes JavaScript tools, libraries in TypeScript 2.0

Microsoft is now shipping TypeScript, 2.0, an upgrade to the company's typed superset of JavaScript. It can be downloaded for Visual Studio 2015 Update 3, accessed by NuGet, used with with Visual Studio Code, or installed via npm.

Version 2.0 focuses on developer productivity, alignment with the ECMAscript standard underlying JavaScript, and support for JavaScript libraries and tools, the TypeScript team said.

Compiling to JavaScript and now serving as the underpinning of Google's Angular 2 JavaScript framework, TypeScript features the same syntax and semantics familiar to JavaScript developers, but also offers types.  It is part of a roster of JavaScript alternatives, such as CoffeeScript, that are seen as easier for developers.

Key improvements in TypeScript 2.0 include simplified declaration file acquisition, in which declarations for a library are made easier, and non-nullable types, in which null and undefined have their own types for developers to express when null/undefined values are acceptable. "Because this is a breaking change, we've added a --strictNullChecks mode to opt into this behavior. However, going forward it will be a general best practice to turn this flag on as it will help catch a wide range of null/undefined errors."

Control flow analyzed types in version 2.0 can produce the most specific type possible. "When combined with non-nullable types, TypeScript can now do much more complex checks, like definite assignment analysis." Also, immutable programming has been made easier in version 2.0 by declaring properties read-only.

The first beta version of TypeScript 2.0, which postponed delivery of async support until TypeScript 2.1, was released in July. In future versions, TypeScript's builders plan to evolve the type system to allow further expression of JavaScript in a statically typed fashion. The TypeScript langauge service and tooling features will be enhanced so tools can become "smarter," the team said.

IDG Insider

PREVIOUS ARTICLE

«Microsoft scrubs Windows 7 PCs of upgrade nagware

NEXT ARTICLE

Report: Android 7.1 and Pixel Launcher will support 3D Touch inspired shortcuts»
author_image
IDG Connect

IDG Connect tackles the tech stories that matter to you

Add Your Comment

Most Recent Comments

Our Case Studies

IDG Connect delivers full creative solutions to meet all your demand generatlon needs. These cover the full scope of options, from customized content and lead delivery through to fully integrated campaigns.

images

Our Marketing Research

Our in-house analyst and editorial team create a range of insights for the global marketing community. These look at IT buying preferences, the latest soclal media trends and other zeitgeist topics.

images

Poll

Will Kotlin overtake Java as the most popular Android programming language in 2018?