Over a million developers have joined DZone.

Getting Started with TypeScript in Visual Studio 2012


On October 1, Microsoft announced TypeScript. The open source preview is available for download from the Microsoft Download Center.

TypeScript adds optional types, classes, and modules to JavaScript allowing the developer to make better tooling for large scaled JavaScript apps. TypeScript comes with the cross platform compiler and compiles to standards-based JavaScript.

To get started, download TypeScript for Visual Studio 2012 from the link below and install the msi file.

Once you install, open your existing web project in Visual Studio 2012 and “Add New Item” -- you will see the new TypeScript File template.

TypeScript for Visual Studio 2012 - 1

TypeScript for Visual Studio 2012 – 1

Intellisense support for TypeScript

TypeScript for Visual Studio 2012 - 2

TypeScript for Visual Studio 2012 – 2

class Employee {
	Name: string;
	constructor (message: string) {
		this.Name = message;
	EmployeeName() {
		return "Hello, " + this.Name;

var emp = new Employee("Senthil Kumar");

var button = document.createElement('button')
button.innerText = "Hi "
button.onclick = function() {


Below are some links to help you get started with TypeScript:




Published at DZone with permission of Senthil Kumar, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}