Creating your first TypeScript application
Here i am using Visual studio 2012 for the demo application. You can download TypeScript for Visualstudio 2012 from here
After downloading Open VisualStudio 2012 and then navigate to File >> Open >> NewProject and then select TypeScript template
It will create a basic folder structure with a sample TypeScript file app.ts
How to create a new TypeScript File?
Right the project and add new TypeScript file
It will create a filename.ts Typescript file and also a mapping file and js file when we build the project. Here i am created demo.ts , So my mapping file and js will look like below
You can write TypeScript code in demo.ts file. I am going to create a new class named Animal with an constructor and method which display a message.
C# equivalent to the above TypeScript Code
Go and Run the index.html, It will pop up an alert message by displaying Cat as a message.
Hope everyone understand how to create a basic TypeScript application