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

  • AI for GitHub Collaboration? Maybe Not So Much

    No doubt GitHub Copilot has been a boon for developers, but AI might not be the best tool for collaboration, according to developers weighing in on a recent social media post from the GitHub team.

  • Visual Studio 2022 Getting VS Code 'Command Palette' Equivalent

    As any Visual Studio Code user knows, the editor's command palette is a powerful tool for getting things done quickly, without having to navigate through menus and dialogs. Now, we learn how an equivalent is coming for Microsoft's flagship Visual Studio IDE, invoked by the same familiar Ctrl+Shift+P keyboard shortcut.

  • .NET 9 Preview 3: 'I've Been Waiting 9 Years for This API!'

    Microsoft's third preview of .NET 9 sees a lot of minor tweaks and fixes with no earth-shaking new functionality, but little things can be important to individual developers.

  • Data Anomaly Detection Using a Neural Autoencoder with C#

    Dr. James McCaffrey of Microsoft Research tackles the process of examining a set of source data to find data items that are different in some way from the majority of the source items.

  • What's New for Python, Java in Visual Studio Code

    Microsoft announced March 2024 updates to its Python and Java extensions for Visual Studio Code, the open source-based, cross-platform code editor that has repeatedly been named the No. 1 tool in major development surveys.

Subscribe on YouTube