1. Introduction to
TypeScript
Ryan Hayes
Tri-Cities .NET User Group
2. State of the Web
● HTML 5 is awesome! (Good riddance, Flash)
● Browsers are hardware accelerated!
● Javascript is still living in the 90's...and this is
how I feel when I use it...
3. What's being done to solve it?
● CoffeeScript (www.coffeescript.org)
○ Ruby-like, concise syntax -> to JavaScript
○ Team must learn and move to CoffeeScript
● Google's Dart (www.dartlang.org)
○ C#-like syntax -> to JavaScript
○ Team must learn and move to Dart
● TypeScript (www.typescriptlang.org)
4. What is TypeScript?
● Superset of JavaScript
● JavaScript is valid TypeScript
● Compiles to JavaScript
● TypeScript sugar is optional!
● Teams can choose to add it or not.
● Is just syntactic sugar...
5. Syntactic Sugar (n.):
Syntactic sugar is syntax within a programming
language designed solely for human benefit in
understanding or expression in a more clear
and concise way.
6. TypeScript Provides
● Classes
● Interfaces
● Modules (packages/namespaces)
● Definition Files for libraries = Intellisense
● Easy inheritance and composition
● Typing and type-checking in the IDE
7. What do I need?
● TypeScript Download:
○ http://www.microsoft.com/en-us/download/details.
aspx?id=34790
● Web Essentials 2012 (VS extension)
○ http://visualstudiogallery.msdn.microsoft.
com/07d54d12-7133-4e15-becb-6f451ea3bea6
● Open source definition files for 3rd party
libraries:
○ https://github.com/borisyankov/DefinitelyTyped