Why Use TypeScript? TypeScript Features
- ES6 proposed features, now
- Easier OOP with classes, interfaces, and inheritance.
- Parameter and return types as well as type inference
- Bacon, rainbows, and unicorns
- Arrow function syntax (Lambda style)
- Type checking
- Lots of other good stuff
You can use TypeScript at the TypeScript playground online or in Visual Studio 2012 when you install TypeScript. In Visual Studio 2013 and later, TypeScript is baked right in and there is no need for a separate download. Upon a successful installation you'll find a TypeScript project template and integration between Visual Studio and TypeScript such as Intellisense and the ability to manage .ts files in Solution Explorer.
A TypeScript Program
You can organize programs in TypeScript much like namespaces in .NET, except in TypeScript we use the module keyword. To create an object model you can nest modules and classes, as the code sample below shows. Notice the export keyword applied to the Models module and the BankAccount class. For C# or VB.NET folks, that makes them public.
TypeScript generates the output below from the code above:
TypeScript Type System
The AccountId, AccountHolderName and Balance fields and properties in the above sample are all typed. The arguments are typed in the constructor which accepts a string. The Deposit, Withdraw, and ChargeFee methods all use typed arguments and returns. Trying to assign a value that is of the wrong type will result in a compile error by the TypeScript compiler. The "Type" in TypeScript should be very clear at this point.
TypeScript and Object Oriented Programming
In addition to basic classes is the notion of inheritance as well as abstraction through interfaces. You can use the interface keyword to define an interface and the implements keyword to apply it. Below is an interface definition,
and a sample of it applied to the BankAccount class. Of course the BankAccount class must implement all members of the interface (in this case only one), like the code below:
Along with interfaces comes the extends keyword to extend a base class and inherit as well as getters and setters (via get and set keywords). You can setup full object models using all of the OO principles.
How TypeScript Compares to Coffee Script
You can write and edit TypeScript in JetBrain's WebStorm and new editors for TypeScript are shipping frequently and the tsc.exe compiler creates a sourcemap file so you can debug TypeScript with your favorite debuggers, including Visual Studio.
 These are not actual TypeScript features. It's too late anyway, I already ate the bacon.