Here’s a partnership that may come as a surprise to many: Microsoft and Google are working together to help make Angular 2 — the next (and somewhat controversial) version of Google’s JavaScript web app framework — better.
Angular has been using its own AtScript superset of Microsoft’s TypeScript for a while now. TypeScript is Microsoft’s attempt at extending JavaScript with features like type annotations, generics and modules. Going forward, the two languages will converge. Angular 2 will be written in TypeScript and developers will be able to write their Angular 2 applications in this language,too.
The AtScript language made its debut last October, but it looks like the AtScript name will be retired in favor of TypeScript.
Angular, at various times in its development, was written in plain JavaScript, Google’s own Dart language and AtScript (there are still separate Dart and JavaScript versions of Angular 1.x today). AtScript added features like introspection, as well as field and metadata annotations to TypeScript. TypeScript will now adopt these features, too, starting with the upcoming 1.5 release of the language, which will launch in beta within the next few weeks.
“Working closely with a rich library like Angular has helped TypeScript to evolve additional language features that simplify end-to-end application development, including annotations, a way to add metadata to class declarations for use by dependency injection or compilation directives,” Microsoft’s corporate vice president of its Developer Division S. “Soma” Somasegar writes in today’s announcement. “Both teams are looking forward to continuing to move TypeScript and JavaScript forward together in the future, including working with the ECMAScript standards body on the future of types in JavaScript.”
Angular 2 has been widely criticized in the developer community because it breaks compatibility with the previous version. Adopting a Microsoft-led language may make it even harder for some to stomach the move to the new version. It’s definitely a win for TypeScript, though, which has seen growing adoption over the last year since its 1.0 release.
The announcement was made at the ng-conf Angular conference in Salt Lake City, Utah, today. We’ve embedded the video from the presentation today (the discussion of TypeScript starts about 20 minutes into the video):