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

  • Hands On: New VS Code Insiders Build Creates Web Page from Image in Seconds

    New Vision support with GitHub Copilot in the latest Visual Studio Code Insiders build takes a user-supplied mockup image and creates a web page from it in seconds, handling all the HTML and CSS.

  • Naive Bayes Regression Using C#

    Dr. James McCaffrey from Microsoft Research presents a complete end-to-end demonstration of the naive Bayes regression technique, where the goal is to predict a single numeric value. Compared to other machine learning regression techniques, naive Bayes regression is usually less accurate, but is simple, easy to implement and customize, works on both large and small datasets, is highly interpretable, and doesn't require tuning any hyperparameters.

  • VS Code Copilot Previews New GPT-4o AI Code Completion Model

    The 4o upgrade includes additional training on more than 275,000 high-quality public repositories in over 30 popular programming languages, said Microsoft-owned GitHub, which created the original "AI pair programmer" years ago.

  • Microsoft's Rust Embrace Continues with Azure SDK Beta

    "Rust's strong type system and ownership model help prevent common programming errors such as null pointer dereferencing and buffer overflows, leading to more secure and stable code."

  • Xcode IDE from Microsoft Archrival Apple Gets Copilot AI

    Just after expanding the reach of its Copilot AI coding assistant to the open-source Eclipse IDE, Microsoft showcased how it's going even further, providing details about a preview version for the Xcode IDE from archrival Apple.

Subscribe on YouTube

Upcoming Training Events