News

Microsoft's TypeScript Enables JavaScript App Scaling

TypeScript has been released under the Apache 2.0 license.

Further confirming the increasing importance of JavaScript to the Microsoft development community, the company today took the wraps off of TypeScript, an open-source programming language with the goal of making it easier to use JavaScript to build large-scale applications.

Microsoft Corporate Vice President S. Somasegar announced the new language on his blog. TypeScript was created for a specific reason, he writes: "getting JavaScript development to scale."

TypeScript is a superset of JavaScript that adds mature language features like "type checking and static analysis, explicit interfaces, and best practices into a single language and compiler," Somasegar states.

He noted that any JavaScript can be brought, hassle-free, into TypeScript; "All JavaScript code is already TypeScript code," Somasegar emphasized several times. Interoperability between the two languages is "simple" he wrote. Simple enough, in fact, to allow a copy-and-paste operation between JavaScript and TypeScript.

Much of that interoperability is gained through "declare files," which Somasegar describes as  "a thin shim of type information describing the interfaces expected in the existing JavaScript." This allows existing JavaScript libraries to be used without any code modification, and "enables IntelliSense and compile-time checking for usage of the DOM as well as of libraries like jQuery and WinRT," Somasegar declares.

Those developers who have moved to Visual Studio 2012 have an advantage, since a plugin is already available: the TypeScript for Visual Studio 2012 plugin. It adds static error messages, code navigation and refactoring among other benefits.

Somasegar writes that TypeScript is fully standards compliant and completely cross-platform, being operating system and browser agnostic. It's available under the Apache 2.0 license. Somasegar even went so far as to say that Microsoft would be "open" to submitting TypeScript to the ECMAScript standards body, which controls the official version of JavaScript.

TypeScript represents another move forward in the evolution of JavaScript, which began life as a client-side scripting language for Web browsers. Over the years, it's become an indispensable Web technology, and Microsoft's interest has followed suit. With the upcoming public release of Windows 8, JavaScript has taken on an exalted place, as Visual Studio Magazine columnist Andrew Brust detailed in a recent article:

"Windows 8 applications, of course, can be developed in JavaScript and HTML5; the framework for the forthcoming LightSwitch HTML5 client apps uses JavaScript as its extensibility mechanism; apps (formerly code-named "Agaves") for Office and SharePoint 2013 are written in JavaScript and use HTML as well."

In an indirect way, JavaScript's growing importance to Microsoft can also be seen by the fact that programming language guru Anders Hejlsberg, who helped create C#, Delphi, Turbo Pascal and LINQ, was a primary force behind TypeScript. In fact, he's created a nearly hour-long video, hosted on Channel 9, explaining TypeScript in detail.

About the Author

Keith Ward is the editor in chief of Virtualization & Cloud Review. Follow him on Twitter @VirtReviewKeith.

comments powered by Disqus

Featured

  • Compare New GitHub Copilot Free Plan for Visual Studio/VS Code to Paid Plans

    The free plan restricts the number of completions, chat requests and access to AI models, being suitable for occasional users and small projects.

  • Diving Deep into .NET MAUI

    Ever since someone figured out that fiddling bits results in source code, developers have sought one codebase for all types of apps on all platforms, with Microsoft's latest attempt to further that effort being .NET MAUI.

  • Copilot AI Boosts Abound in New VS Code v1.96

    Microsoft improved on its new "Copilot Edit" functionality in the latest release of Visual Studio Code, v1.96, its open-source based code editor that has become the most popular in the world according to many surveys.

  • AdaBoost Regression Using C#

    Dr. James McCaffrey from Microsoft Research presents a complete end-to-end demonstration of the AdaBoost.R2 algorithm for regression problems (where the goal is to predict a single numeric value). The implementation follows the original source research paper closely, so you can use it as a guide for customization for specific scenarios.

  • Versioning and Documenting ASP.NET Core Services

    Building an API with ASP.NET Core is only half the job. If your API is going to live more than one release cycle, you're going to need to version it. If you have other people building clients for it, you're going to need to document it.

Subscribe on YouTube