2. What is TypeScript?
A language that compiles onto JavaScript
May be used to develop JavaScript applications
for client-side or server-side
• Web browser (client)
• NodeJS (server)
4. A bit more about TypeScript…
• First appearance: October of 2012 (version 0.8)
• First stable release: January of 2016 (version 1.0)
• License: Apache License 2.0
(permissive free software license)
Can Cannot Must
• Commercial Use
• Modify
• Distribute
• Sub-license
• Private Use
• Place Warranty
• Hold Liable
• Use Trademark
• Include Copyright
• Include License
• State Changes
• Include Notice
5. A bit more about TypeScript…
• First appearance: October of 2012 (version 0.8)
• First stable release: January of 2016 (version 1.0)
• License: Apache License 2.0
(permissive free software license)
• Created & Developed by: Microsoft
TypeScript compiler itself was written in TypeScript
and then transcompiled into JavaScript.
6. Technicalities of TypeScript
• Target compatibility with ECMAScript 3 (ES3)
• Strict superset of ECMAScript 2015 (ES5)
• ECMAScript 6 (ES6) support
7. Technicalities of TypeScript
• Target compatibility with ECMAScript 3 (ES3)
• Strict superset of ECMAScript 2015 (ES5)
• ECMAScript 6 (ES6) support
So what does this mean?
• It’s compatible with most modern browsers
• Supports features many browsers don’t have yet!
8. Why TypeScript?
• Build large scale applications
• Cross platform
any browser, any host, any OS !
• Static Typing (ʘ‿ʘ)
• Open Source
cost you not to begin creating!
• Compatible with existing libraries / modules
NodeJS, jQuery, Underscore, Backbone, Require, etc..
9. How does TypeScript work?
• Transpiles from TypeScript syntax into
JavaScript ES5 (JetBrains, Visual Studio, NPM)
contains no runtime cost!
- www.npmjs.com/package/typescript
• Yes you can!
Automatically compile TypeScript to JavaScript
on the fly (in the browser) with Tag Support
- www.github.com/niutech/typescript-compile
- www.github.com/basarat/typescript-script
10. Core features of TypeScript
• Gradual Typing
Catch errors at compile time vs. runtime
• Object-Oriented features on JavaScript
Syntax sugar - not real OOP (still prototype inheritance)
- Namespaces
- Interfaces
- Classes
- Constructors
- Private & Static fields (not truly denying access but will throw an error)
- Methods (basically a function)
• Retains functional aspects of JavaScript