Introduction to TypeScript presentation
Full slides for a tech talk I gave today on Microsoft’s new programming language TypeScript.
TypeScript JavaScript
TypeScript was released by Microsoft just over a week ago and is being touted as “a language for application-scale JavaScript development.”
The basic premise is JavaScript with optional static typing, allowing superior tooling support.
- TypeScript is a typed superset of JavaScript that compiles to plain JavaScript.
- Any browser. Any host. Any OS.
- Open Source.
Support for TypeScript is currently limited to Visual Studio 2012, via a plugin, or the TypeScript Playground web-based editor.
The presentation
To discover exactly what the language provides, and its limitations, I created and presented an introductory tech talk entitled “TypeScript: JavaScript for tools.”
The full slide deck is now available to view, download and/or modify.
-
View online
-
Download a PDF generated from the slides
-
Browse the source on github
The audience were predominantly C# developers, which should indicate the level of technical detail.
Slide deck was created using the wonderful deck.js for building HTML presentations. The PDF was generated using PhantomJS and deck2pdf. Styling was gratuitously borrowed from www.typescriptlang.org.
Hosting the TypeScript compiler
A particular feature of the html5 presentation is that each TypeScript code snippet is compiled to JavaScript using the TypeScript compiler itself, on-the-fly between slide transitions.
The presentation goes through how to host the compiler within an html page, or view the source of presentation.html
and assets/compiler.js
for further details.
Feel free to copy the source and/or content of these slides for your own use (attribution would be appreciated).
Presentation Outline
- Design Goals
- Tooling Support
- Installation
- File Extensions
- Declaration Source Files
- Type Annotations
- Types
- Arrow Function Expressions
- Classes
- Interfaces
- Structural Types
- Modules
- Source File Dependencies
- Source Map Support
- Self Hosting
- Why use TypeScript?
- Why not?
- Resources
In my view, TypeScript is one of the more exciting technologies to be released by Microsoft in the recent years. I’m excited by this nascent language, currently at version 0.8, and the possibilities for its the future. The web-based editor shows great promise at this early stage; imagine an entire programming environment requiring no more than a browser.