Feeds

TypeScript 0.9 arrives with new compiler, support for generics

Biggest update yet for Microsoft's JavaScript alternative

Secure remote control for conventional and virtual desktops

Microsoft on Tuesday announced TypeScript 0.9.0, the latest version of its JavaScript killer alternative web language, which Redmond describes as the "largest update to TypeScript to date."

In addition to the usual assortment of bug fixes and performance improvements, this release includes a number of significant new language features and introduces a new, more scalable compiler architecture, according to a blog post by TypeScript program manager Jonathan Turner.

"This release marks the first step of the 0.9.x series, introducing most of the new capabilities of this series which will be further refined over the next few months based on your feedback," Turner wrote.

Perhaps the most important language enhancement is the inclusion of generics, which Turner described as the feature most often requested by TypeScript 0.8 users. Generics allow you to declare APIs using placeholders for the data types of arguments and return values, allowing for more code reuse with increased type safety.

Type safety is of course one the most important features of TypeScript, which builds on the loosely typed, prototype-based JavaScript syntax by adding optional strict typing and class-based object orientation.

Because TypeScript is a superset of JavaScript, valid JavaScript code is also valid TypeScript code. TypeScript just provides additional language features to enable what Microsoft terms "application-scale" JavaScript programming.

In addition to generics, TypeScript 0.9 introduces a finalized syntax for enumerated types (enums), the ability to overload methods to return values of various types based on the specific constants they're fed as arguments, and new syntax to better support JavaScript and TypeScript modules.

A number of other relatively minor changes to the syntax have also been made that could break compatibility with code written for earlier versions of TypeScript – you can find a list here.

On top of these changes, the TypeScript compiler has been significantly reengineered to provide "a much higher fidelity implementation" of the TypeScript language specification, and to provide better incremental performance when working in IDEs such as Visual Studio.

TypeScript 0.9 already provides much better performance for code completion, error reporting, type information, and various other IDE features, Turner said. Future versions are expected to continue this trend, with the goal of ensuring that IDEs can still provide good performance with code bases of 100,000 lines or more.

On the downside, command-line compilation with TypeScript 0.9.0 is "somewhat slower" than when using the older compiler, but Turner says he expects this to improve significantly in TypeScript 0.9.1.

Microsoft has already rewritten its type information for the JavaScript API and HTML DOM to use the new TypeScript 0.9 language features, and has updated its documentation and code samples, so that developers can start taking advantage of generics and other improvements immediately after they upgrade.

As with previous versions of TypeScript, Microsoft has released version 0.9 under the Apache 2.0 open source license, and it is available for download from the TypeScript site on CodePlex as of Tuesday. ®

Choosing a cloud hosting partner with confidence

More from The Register

next story
Microsoft to bake Skype into IE, without plugins
Redmond thinks the Object Real-Time Communications API for WebRTC is ready to roll
Microsoft promises Windows 10 will mean two-factor auth for all
Sneak peek at security features Redmond's baking into new OS
Mozilla: Spidermonkey ATE Apple's JavaScriptCore, THRASHED Google V8
Moz man claims the win on rivals' own benchmarks
FTDI yanks chip-bricking driver from Windows Update, vows to fight on
Next driver to battle fake chips with 'non-invasive' methods
PEAK APPLE: iOS 8 is least popular Cupertino mobile OS in all of HUMAN HISTORY
'Nerd release' finally staggers past 50 per cent adoption
DEATH by PowerPoint: Microsoft warns of 0-day attack hidden in slides
Might put out patch in update, might chuck it out sooner
Ubuntu 14.10 tries pulling a Steve Ballmer on cloudy offerings
Oi, Windows, centOS and openSUSE – behave, we're all friends here
Was ist das? Eine neue Suse Linux Enterprise? Ausgezeichnet!
Version 12 first major-number Suse release since 2009
prev story

Whitepapers

Why cloud backup?
Combining the latest advancements in disk-based backup with secure, integrated, cloud technologies offer organizations fast and assured recovery of their critical enterprise data.
A strategic approach to identity relationship management
ForgeRock commissioned Forrester to evaluate companies’ IAM practices and requirements when it comes to customer-facing scenarios versus employee-facing ones.
Reg Reader Research: SaaS based Email and Office Productivity Tools
Read this Reg reader report which provides advice and guidance for SMBs towards the use of SaaS based email and Office productivity tools.
Top 5 reasons to deploy VMware with Tegile
Data demand and the rise of virtualization is challenging IT teams to deliver storage performance, scalability and capacity that can keep up, while maximizing efficiency.
Mitigating web security risk with SSL certificates
Web-based systems are essential tools for running business processes and delivering services to customers.