Introduction to TypeScript Michael Chu Agenda JavaScript 1

Introduction to TypeScript Michael Chu Agenda JavaScript 1

Introduction to TypeScript Michael Chu Agenda JavaScript 1 Features 2 Alternatives 3

Declarations 4 Tooling 5 6 Resources JavaScript 1995 20 years ago

Brendan Eich Netscape Communica., Mozilla Foundation Dynamic computer programming language Client side Server side (Node.js) Single Page App

Demo JavaScript 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

Expert JavaScript is the assembly language of the Web. Erik Meijer (software architect) Expert You can write large programs in JavaScript. You just cant maintain them. Anders Hejlsberg (father of C#) The Alternatives Hard core JavaScript development JavaScript preprocessors that compiles to

JavaScript: S# CoffeeScript coffeescript.org custom lang. Clojurescript Dart http://dartlang.orggithub.com custom lang. custom lang. by Google Script#

github.com C# 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 Copy JS code

TS Into TS file JS Compile to JavaScript 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 Demos TypeScript Highlights Tool Features

Type Inference Intellisense, statement comp. Compile on Save Preview Pane ECMAScript version Redirect JavaScript output Generate declaration files TypeScript Code

Type Annotation Any and Primitive Type Interface, Implementation Class, constructor

Opt. Parameter, overloads Event handler Get accessor, private, static Arrow function, lambda Module TypeScript Versions

TypeScript TypeScript TypeScript TypeScript TypeScript 1.3 1.3 1.4 1.4 2.0 for VS older (Web Essentials)

for VS 2013 Update 2 for VS 2013 for VS 2015 CTP5 (vNext) Resources http://www.typescriptlang.org http:// www.typescriptlang.org/Content/TypeScript%20Lan guage%20Specification.pdf http://www.typescriptlang.org/Playground http://vswebessentials.com/download https://github.com/borisyankov/DefinitelyTyped https://github.com/Microsoft/TypeScript

Angular 2: Built on TypeScript http://blogs.msdn.com/b/typescript/archive/2015/03 /05/angular-2-0-built-on-typescript.aspx http://blogs.msdn.com/b/visualstudio/archive/2015/ 03/12/a-preview-of-angular-2-and-typescript-in-visu al-studio.aspx Summary Open source language that compiles into JavaScript Code encapsulation Maintainable code Tooling support Application scale JavaScript development is

hard TypeScript makes it easier Questions

Recently Viewed Presentations

  • Effectiveness in Clinical Documentation - ACDIS

    Effectiveness in Clinical Documentation - ACDIS

    Effectiveness in Clinical Documentation. ICD-10 Around the Corner, Practical Steps for Physician Preparation. ... Intraoperative hemorrhage and hematoma of spleen complicating a procedure on the spleen; and ... Usually in healing or recovery phase . Injury Designation. Initial - A...
  • I'm Offended - Knollwood Church of Christ

    I'm Offended - Knollwood Church of Christ

    I'm Offended !! Offense: 1. a violation or breaking of a social or moral rule; transgression; sin. 2. a transgression of the law; misdemeanor. 3. a cause of transgression or wrong. 4. something that offends or displeases. 5. the act...
  • Database Systems Instructor Name: Lecture-9 Contents Degree of

    Database Systems Instructor Name: Lecture-9 Contents Degree of

    It is the relationship between Entity Instance of the same Entity Type, also called Recursive Relationship Usual Situations When Unary Relationship exist are: One to One Relationship, when an entity instance is associated with exactly one entity instance, for example,...
  • northernca.apwa.net

    northernca.apwa.net

    Materials Acceptance Process. Determine products to sample and test, source inspect, or accept by certificate of compliance. Send CEM-3101 to source inspection firm for material to be source inspected. File copy in CAT 31. Determine if initial sampling and testing...
  • SIS Solution Project - University of Florida

    SIS Solution Project - University of Florida

    Students will see new degree audit in ONE.UF. Advisors will have access to current and new audits. Advising Notes will only be written in new system. Advisors enter exceptions in old system for Summer graduates ONLY. All other exceptions are...
  • BTEC BUSINESS UNIT 2 - Gazi Asha

    BTEC BUSINESS UNIT 2 - Gazi Asha

    BTEC BUSINESS UNIT 2. Aims and Objectives. Lesson Objectives. define what is meant by the aims and objectives of businesses in different sectors. (unit 1 P1) Success criteria. Create a full set of notes from which to create your report....
  • Wireless Communications Principles and Practice

    Wireless Communications Principles and Practice

    Wireless Communications Principles and Practice 2nd Edition Prentice-Hall Chapter 1: Introduction to Wireless Communication Systems Prof. Theodore S. Rappaport University of Texas at Austin www.wncg.org The electronics boom Figure 1.1 The growth of mobile telephony as compared with other popular...
  • Classical Chinese Philosophies

    Classical Chinese Philosophies

    Mandalas What is a Mandala? A circular image that represents our connection to the infinite. ... No self exists, Self is false idea Hindu: Identity is self, but not the Essential self Links to Help make a Mandala Click Here...