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

  • See Prompts Microsoft Engineers Use for Bleeding-Edge Multimodal RAG AI Research

    Vision-centric queries show how front-line experts are prompting LLMs these days.

  • AI Explains Expressions in Update to Java on VS Code

    "The Spring Tools now show code lenses above these expressions that allow you to quickly let GitHub Copilot explain those statements for you."

  • Microsoft Eases Integration with Semantic Kernel AI SDK

    The basic idea is to provide unified API abstractions, especially for idiomatic C# code, to help platform developers and others work with any provider with standard implementations for caching, telemetry, tool calling and other common tasks.

  • Final .NET 9 Preview Ships with Go-Live License

    Visual Studio developers can now download the SDK for .NET 9 Release Candidate 2 with a go-live license, meaning devs get Microsoft support for production applications even before the framework reaches general availability next month.

Subscribe on YouTube