Microsoft TypeScript graduates to Visual Studio

TypeScript offers a way to organize JavaScript code for large programming projects

By , IDG News Service |  Software

TypeScript, a superset of the JavaScript programming language developed by Microsoft for creating complex applications, is now a full-fledged member of the company's flagship Visual Studio integrated development environment (IDE).

Tuesday's release of Visual Studio 2013 Update 2 includes TypeScript as a built-in programming language for the IDE. The company has also posted the first release candidate of what will be the production-ready version of the language, TypeScript 1.0.

"Increasingly we are seeing people use JavaScript to write large applications," said Anders Hejlsberg, Microsoft chief architect for Microsoft's C# language who also helped create TypeScript.

JavaScript, Hejlsberg noted, was intended for writing smaller programs. It does less well with larger software projects -- involving hundreds of thousands of lines of code, or even a million lines of code.

"It gets very unwieldy to maintain a code base," of a large JavaScript program, Hejlsberg said. "You can't safely refactor anything and there is no large-scale structuring concepts like classes or modules."

TypeScript is very similar to JavaScript but also incorporates traditional programming language constructs such as static typing and object classes, which set the stage for advanced IDE tooling and better organization of code.

Introduced in 2012, TypeScript is not an entirely new language. It is a superset of the ECMAScript, a specification for a scripting language maintained by the Ecma International standards body. The widely used JavaScript is based on ECMAScript.

Unlike JavaScript code, however, TypeScript program code must go through a compiler--one is available as open source from Microsoft. The output is formatted as JavaScript, and that code can run on any browser, and be incorporated into any JavaScript framework or server-side technology, such as node.js.

By compiling the code, TypeScript can offer many features typically associated with more traditional programming languages, such as Java and C++.

TypeScript offers static typing, which requires developers to define the data type of a variable before using that variable. It also features generics, which allows methods to be applied on different data types.

Join us:
Facebook

Twitter

Pinterest

Tumblr

LinkedIn

Google+

Answers - Powered by ITworld

ITworld Answers helps you solve problems and share expertise. Ask a question or take a crack at answering the new questions below.

Join us:
Facebook

Twitter

Pinterest

Tumblr

LinkedIn

Google+

Ask a Question