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

  • Evaluating a UI Design Expert inspection methods Cognitive

    Evaluating a UI Design Expert inspection methods Cognitive

    User Interface Principles/Heuristics (cont.) Heuristic Evaluation Definition and goals: Systematic inspection of a UI design for usability Using a set of heuristics or principles Purpose is to identify usability problems General approach: Conducted by a small number of evaluators (how...
  • Racial and Ethnic Relations - sshs.ecboe.org

    Racial and Ethnic Relations - sshs.ecboe.org

    Types of Discrimination. Legal discrimination- is upheld by law. Apartheid system in South Africa is an example of this. South Africa had an elaborate system of laws that distinguished the political, economic, and legal rights of white South Africans from...
  • Investigating Artists University of Wisconsin - Stout Instructor:

    Investigating Artists University of Wisconsin - Stout Instructor:

    Pointillism is similar but in that technique the color itself is composed of dots. * More Outstanding Illustrators Gail Gibbons Anna Grossnickle Hines Steven Kellogg Tedd Arnold Robert McCloskey Jan Brett Janet Stevens Wendy Halperin* David Wisniewski Anita Lobel Figure...
  • Sources of Energy - Energy Conservation Club | Energy ...

    Sources of Energy - Energy Conservation Club | Energy ...

    Sources of Energy TEKS 5.7.C Energy Sources Engage Which of the following slides show a source of energy for our homes, cars, etc. ? As we scroll through the slides raise your hand when you see one that shows a...
  • Nonverbal Communication

    Nonverbal Communication

    That is a diameter of intimate zone. Small group ecology haptics Who can you touch? When can you touch? How can you touch? vocalics The text uses the alternate common term: paralanguage It is all aspects of the voice other...
  • Chapter 3 Deductive Reasoning Agents - Lehigh CSE

    Chapter 3 Deductive Reasoning Agents - Lehigh CSE

    The Semantic Web. Definition. The . Semantic Web. is not a separate Web but an extension of the current one, in which information is given well-defined meaning, better enabling computers and people to work in cooperation.
  • Impact of Fall Prevention on Nurses and Care

    Impact of Fall Prevention on Nurses and Care

    Quotes from multiple participants. Detailed memos. 6. Fall Message. Falls. Falls. ... We got really scared off fall risk patients ... "I'm going to get fired… somebody from administration is going to come down and we are going to get...
  • Chapter 1

    Chapter 1

    Title: Chapter 1 Author: grickert0001 Last modified by: sjohnson17 Created Date: 12/15/2005 6:30:05 PM Document presentation format: On-screen Show (4:3)