Presentation is loading. Please wait.

Presentation is loading. Please wait.

Introduction to TypeScript

Similar presentations


Presentation on theme: "Introduction to TypeScript"— Presentation transcript:

1 Introduction to TypeScript
Michael Chu

2 Agenda 1 2 3 4 5 6 JavaScript Features Declarations Alternatives
Tooling Resources

3 JavaScript 1995 20 years ago Dynamic computer programming language
Brendan Eich Netscape Communica., Mozilla Foundation Client side Server side (Node.js) Single Page App

4 Demo JavaScript

5 Application scale JavaScript development is hard
not design as a programming language for big application does not have static typing lack structuring mechanisms like classes, modules, interfaces

6 Expert “JavaScript is the assembly language of the Web.”
Erik Meijer (software architect)

7 Expert “You can write large programs in JavaScript. You just can’t maintain them.” Anders Hejlsberg (father of C#)

8 S# The Alternatives Hard core JavaScript development
JavaScript preprocessors that compiles to JavaScript: S# CoffeeScript coffeescript.org custom lang. Clojurescript github.com custom lang. Script# github.com C# Dart custom lang. by Google

9 TypeScript TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. TypeScript is a language for application scale JavaScript development. Any browser. Any host. Any OS. Open Source. ~typescriptlang.org JS TS JS Copy JS code Into TS file Compile to JavaScript

10 TypeScript Key Features
Support standard JavaScript code with static typing Zero cost: Static types completely disappear at run-time Encapsulation though classes, modules and interfaces Constructors, properties and functions (public, private) Enums Lambda and generics support Intellisense and syntax checking IDE support Visual Studio Sublime Text, Vi, Emacs Eclipse, WebStorm Preview Pane – Web Essentials

11 Demos TypeScript

12 Highlights Tool Features TypeScript Code Type Inference
Intellisense, statement comp. Compile on Save Preview Pane ECMAScript version Redirect JavaScript output Generate declaration files Type Annotation Any and Primitive Type Interface, Implementation Class, constructor Opt. Parameter, overloads Event handler Get accessor, private, static Arrow function, lambda Module Typed definitions And more…

13 TypeScript Versions TypeScript 1.3 for VS older (Web Essentials)
TypeScript 1.3 for VS 2013 Update 2 TypeScript 1.4 for VS 2013 TypeScript 1.4 for VS 2015 CTP5 TypeScript 2.0 (vNext)

14 Resources http://www.typescriptlang.org

15 Angular 2: Built on TypeScript

16 Summary Open source language that compiles into JavaScript
Code encapsulation Maintainable code Tooling support Application scale JavaScript development is hard TypeScript makes it easier

17 Questions


Download ppt "Introduction to TypeScript"

Similar presentations


Ads by Google