Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

TypeScript Introduction

99 views

Published on

A short presentation on an introduction for TypeScript that I did at the Luxembourg JavaScript meetup for the month of June, 2016.

Published in: Technology
  • Be the first to comment

  • Be the first to like this

TypeScript Introduction

  1. 1. TypeScript Introduction By, Travis van der Font
  2. 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)
  3. 3. That’s all !
  4. 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. 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. 6. Technicalities of TypeScript • Target compatibility with ECMAScript 3 (ES3) • Strict superset of ECMAScript 2015 (ES5) • ECMAScript 6 (ES6) support
  7. 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. 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. 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. 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
  11. 11. TypeScript's Typing Support • Boolean • Number • String • Any • Array • Enum • Void • Tuple
  12. 12. And now.. that’s all! Time for some examples. “It is just JavaScript - just with the seat belt fastened.” - Tero Parviainen www.travisfont.com

×