TypeScript for Visual Studio 2012

Yesterday , Somasegar , in his blog announced the new open source project called TypeScript Preview which is available for download from 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.

Just download the TypeScript for Visual Studio 2012 from the below link 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 the 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() {
	alert(emp.EmployeeName())
}

document.body.appendChild(button)

Below are links to get started with the TypeScript

If you enjoyed this post, please consider leaving a comment or subscribing to the RSS feed to have future articles delivered to your feed reader.

1 Response

Leave a Reply