SlideShare a Scribd company logo
Building End-to-End
Web Apps
Using TypeScript
Gil Fink

Senior Architect
SELA
Agenda
The Why
Introduction to TypeScript
Building a Simple App with TypeScript
Q&A
Summary
Wait! JavaScript End to End?
"JavaScript is the Assembly Language of the
Web"
- Erik Meijer
“you can write large programs in JavaScript.
You just can’t maintain them”
- Anders Hejlsberg
JavaScript Benefits
Powerful language:
Functional
Object oriented
Dynamic
Great runtimes
Huge community
Tons of libraries
Tools
But it also includes a lot of bad parts
The Alternatives
We have several alternatives:
Hard core JavaScript development
CoffeeScript – http://coffeescript.org
Dart – http://dartlang.org
Clojurescript https://github.com/clojure/clojurescript
Script# - http://scriptsharp.com/
What is TypeScript?
“TypeScript is a typed superset of JavaScript that
compiles to plain JavaScript”
~typescriptlang.org

6
Hello TypeScript

Demo
TypeScript Key Features

Support
standard
JavaScript code
with static
typing

Encapsulation
through classes
and modules

Support for
constructors,
properties and
functions

Interfaces and
enums support

Lambda
support => and
generics

Intellisense and
syntax checking

8
From TypeScript to JavaScript
TypeScript Code

JavaScript Code
TypeScript
Compiler

class Greeter {
greeting: string;
constructor(message: string) {
this.greeting = message;
}

tsc

greet() {
return “Hi," + this.greeting;
}

var Greeter = (function () {
function Greeter(message) {
this.greeting = message;
}
Greeter.prototype.greet =
function () {
return “Hi," + this.greeting;
};
return Greeter;
})();

}

9
TypeScript Type Annotations
You can add type annotations to variables and
functions

var str : string = ‘hello’; // str is annotated as string

function foo(name: string) : string { // both parameter and function annotated
return ‘hello’ + name;
}

10
Classes and Interfaces
You can define classes
You can define interfaces and implement them
later
interface IGreeter {
greet(): void;
}

var Greeter = (function () {
function Greeter() {
}

class Greeter implements IGreeter{
greeting: string;

Greeter.prototype.greet = function () {
console.log(this.greeting);

greet() {
console.log(this.greeting);
}

}

};
return Greeter;

})();
Modules
You define modules to wrap classes, interfaces
and functionality
module app {
export interface IGreeter {
greet(): void;
export class Greeter implements IGreeter {
greeting: string;
greet() {

console.log(this.greeting);
}
}

(function (app) {
var Greeter = (function () {

function Greeter() {

}

}

var app;

}
Greeter.prototype.greet = function () {
console.log(this.greeting);
};
return Greeter;
})();
app.Greeter = Greeter;
})(app || (app = {}));
Building a Simple End-to-End App with TypeScript

Demo
Questions
Summary
•

•

Open source language that compiles into
JavaScript
Key features:
• Code encapsulation
• Maintainable code
• Tooling support

•

Learn TypeScript today!
Resources
Session slide deck and demos –
http://sdrv.ms/18SDF8r
TypeScript – http://www.typescriptlang.org
My Website – http://www.gilfink.net
Follow me on Twitter – @gilfink
THANK YOU
Gil Fink
Senior Architect
gilf@sela.co.il
@gilfink
http://www.gilfink.net

More Related Content

What's hot (20)

React vs angular (mobile first battle)
React vs angular (mobile first battle)
Michael Haberman
 
Groovy / comparison with java
Groovy / comparison with java
Liviu Tudor
 
Milos Marinkovic "Modular Android UI"
Milos Marinkovic "Modular Android UI"
IT Event
 
Daniel Steigerwald: EsteJS - javascriptové aplikace robusně, modulárně a komf...
Daniel Steigerwald: EsteJS - javascriptové aplikace robusně, modulárně a komf...
Develcz
 
Daniel Steigerwald - Este.js - konec velkého Schizma
Daniel Steigerwald - Este.js - konec velkého Schizma
Develcz
 
Introduction to React Native
Introduction to React Native
dvcrn
 
45 Tools to Boost Your Front-End
45 Tools to Boost Your Front-End
Nicolas PENNEC
 
Ask The Expert - Typescript: A stitch in time saves nine
Ask The Expert - Typescript: A stitch in time saves nine
Gianluca Carucci
 
Angular directives and pipes
Angular directives and pipes
Knoldus Inc.
 
Nicholas Gustilo "Clean Android: building great mobile apps"
Nicholas Gustilo "Clean Android: building great mobile apps"
IT Event
 
Alt Dot Net Usergroup: Does the world end if you stop using Visual Studio?
Alt Dot Net Usergroup: Does the world end if you stop using Visual Studio?
Garry Stewart
 
Unity - NullReferenceException = ♥ / Aleksandr Kugushev (EPAM)
Unity - NullReferenceException = ♥ / Aleksandr Kugushev (EPAM)
DevGAMM Conference
 
Firebug: Javascript Development Made Easier
Firebug: Javascript Development Made Easier
Binny V A
 
F# on the Server-Side
F# on the Server-Side
Tomas Petricek
 
Introducing Razor - A new view engine for ASP.NET
Introducing Razor - A new view engine for ASP.NET
Shiju Varghese
 
Introduction To JavaScript
Introduction To JavaScript
Reema
 
CouchApp - Build scalable web applications and relax
CouchApp - Build scalable web applications and relax
openForce Information Technology GesmbH
 
node.js - Fast event based web application development
node.js - Fast event based web application development
openForce Information Technology GesmbH
 
Property Based BDD Examples (ETSI UCAAT 2016, Budapest)
Property Based BDD Examples (ETSI UCAAT 2016, Budapest)
Gáspár Nagy
 
Itjsf49
Itjsf49
Kati Long
 
React vs angular (mobile first battle)
React vs angular (mobile first battle)
Michael Haberman
 
Groovy / comparison with java
Groovy / comparison with java
Liviu Tudor
 
Milos Marinkovic "Modular Android UI"
Milos Marinkovic "Modular Android UI"
IT Event
 
Daniel Steigerwald: EsteJS - javascriptové aplikace robusně, modulárně a komf...
Daniel Steigerwald: EsteJS - javascriptové aplikace robusně, modulárně a komf...
Develcz
 
Daniel Steigerwald - Este.js - konec velkého Schizma
Daniel Steigerwald - Este.js - konec velkého Schizma
Develcz
 
Introduction to React Native
Introduction to React Native
dvcrn
 
45 Tools to Boost Your Front-End
45 Tools to Boost Your Front-End
Nicolas PENNEC
 
Ask The Expert - Typescript: A stitch in time saves nine
Ask The Expert - Typescript: A stitch in time saves nine
Gianluca Carucci
 
Angular directives and pipes
Angular directives and pipes
Knoldus Inc.
 
Nicholas Gustilo "Clean Android: building great mobile apps"
Nicholas Gustilo "Clean Android: building great mobile apps"
IT Event
 
Alt Dot Net Usergroup: Does the world end if you stop using Visual Studio?
Alt Dot Net Usergroup: Does the world end if you stop using Visual Studio?
Garry Stewart
 
Unity - NullReferenceException = ♥ / Aleksandr Kugushev (EPAM)
Unity - NullReferenceException = ♥ / Aleksandr Kugushev (EPAM)
DevGAMM Conference
 
Firebug: Javascript Development Made Easier
Firebug: Javascript Development Made Easier
Binny V A
 
Introducing Razor - A new view engine for ASP.NET
Introducing Razor - A new view engine for ASP.NET
Shiju Varghese
 
Introduction To JavaScript
Introduction To JavaScript
Reema
 
Property Based BDD Examples (ETSI UCAAT 2016, Budapest)
Property Based BDD Examples (ETSI UCAAT 2016, Budapest)
Gáspár Nagy
 

Viewers also liked (16)

Learning typescript
Learning typescript
Alexandre Marreiros
 
Typescript - MentorMate Academy
Typescript - MentorMate Academy
Dimitar Danailov
 
TypeScript Introduction
TypeScript Introduction
Travis van der Font
 
Introduction about type script
Introduction about type script
Binh Quan Duc
 
Introduction to Type Script by Sam Goldman, SmartLogic
Introduction to Type Script by Sam Goldman, SmartLogic
SmartLogic
 
Type script
Type script
LearningTech
 
Introduction to Angular with TypeScript for .NET Developers
Introduction to Angular with TypeScript for .NET Developers
Laurent Duveau
 
Typescript in 30mins
Typescript in 30mins
Udaya Kumar
 
TypeScript - An Introduction
TypeScript - An Introduction
NexThoughts Technologies
 
TypeScript Overview
TypeScript Overview
Aniruddha Chakrabarti
 
Typescript 101 introduction
Typescript 101 introduction
Bob German
 
Introduction to TypeScript
Introduction to TypeScript
Bob German
 
Getting started with typescript
Getting started with typescript
C...L, NESPRESSO, WAFAASSURANCE, SOFRECOM ORANGE
 
Getting started with typescript and angular 2
Getting started with typescript and angular 2
Knoldus Inc.
 
TypeScript: coding JavaScript without the pain
TypeScript: coding JavaScript without the pain
Sander Mak (@Sander_Mak)
 
Introduction to TypeScript by Winston Levi
Introduction to TypeScript by Winston Levi
Winston Levi
 
Typescript - MentorMate Academy
Typescript - MentorMate Academy
Dimitar Danailov
 
Introduction about type script
Introduction about type script
Binh Quan Duc
 
Introduction to Type Script by Sam Goldman, SmartLogic
Introduction to Type Script by Sam Goldman, SmartLogic
SmartLogic
 
Introduction to Angular with TypeScript for .NET Developers
Introduction to Angular with TypeScript for .NET Developers
Laurent Duveau
 
Typescript in 30mins
Typescript in 30mins
Udaya Kumar
 
Typescript 101 introduction
Typescript 101 introduction
Bob German
 
Introduction to TypeScript
Introduction to TypeScript
Bob German
 
Getting started with typescript and angular 2
Getting started with typescript and angular 2
Knoldus Inc.
 
TypeScript: coding JavaScript without the pain
TypeScript: coding JavaScript without the pain
Sander Mak (@Sander_Mak)
 
Introduction to TypeScript by Winston Levi
Introduction to TypeScript by Winston Levi
Winston Levi
 
Ad

Similar to Building End to-End Web Apps Using TypeScript (20)

End to-end apps with type script
End to-end apps with type script
Gil Fink
 
One language to rule them all type script
One language to rule them all type script
Gil Fink
 
Building End to-End Web Apps Using TypeScript
Building End to-End Web Apps Using TypeScript
Gil Fink
 
Getting Started with the TypeScript Language
Getting Started with the TypeScript Language
Gil Fink
 
One language to rule them all type script
One language to rule them all type script
Gil Fink
 
Getting Started with TypeScript
Getting Started with TypeScript
Gil Fink
 
Type script
Type script
srinivaskapa1
 
TypeScript for Java Developers
TypeScript for Java Developers
Yakov Fain
 
Type script
Type script
Mallikarjuna G D
 
Benefits of Typescript and Javascript Limitations
Benefits of Typescript and Javascript Limitations
Srinivasa Perumal
 
Using type script to build better apps
Using type script to build better apps
ColdFusionConference
 
Using type script to build better apps
Using type script to build better apps
devObjective
 
TypeScript Best Practices
TypeScript Best Practices
felixbillon
 
The advantage of developing with TypeScript
The advantage of developing with TypeScript
Corley S.r.l.
 
AngularConf2015
AngularConf2015
Alessandro Giorgetti
 
Mini-Training: TypeScript
Mini-Training: TypeScript
Betclic Everest Group Tech Team
 
Unit 1 - TypeScript & Introduction to Angular CLI.pptx
Unit 1 - TypeScript & Introduction to Angular CLI.pptx
Malla Reddy University
 
Introduction to TypeScript
Introduction to TypeScript
André Pitombeira
 
TypeScript - All you ever wanted to know - Tech Talk by Epic Labs
TypeScript - All you ever wanted to know - Tech Talk by Epic Labs
Alfonso Peletier
 
Introduction to TypeScript
Introduction to TypeScript
NexThoughts Technologies
 
End to-end apps with type script
End to-end apps with type script
Gil Fink
 
One language to rule them all type script
One language to rule them all type script
Gil Fink
 
Building End to-End Web Apps Using TypeScript
Building End to-End Web Apps Using TypeScript
Gil Fink
 
Getting Started with the TypeScript Language
Getting Started with the TypeScript Language
Gil Fink
 
One language to rule them all type script
One language to rule them all type script
Gil Fink
 
Getting Started with TypeScript
Getting Started with TypeScript
Gil Fink
 
TypeScript for Java Developers
TypeScript for Java Developers
Yakov Fain
 
Benefits of Typescript and Javascript Limitations
Benefits of Typescript and Javascript Limitations
Srinivasa Perumal
 
Using type script to build better apps
Using type script to build better apps
ColdFusionConference
 
Using type script to build better apps
Using type script to build better apps
devObjective
 
TypeScript Best Practices
TypeScript Best Practices
felixbillon
 
The advantage of developing with TypeScript
The advantage of developing with TypeScript
Corley S.r.l.
 
Unit 1 - TypeScript & Introduction to Angular CLI.pptx
Unit 1 - TypeScript & Introduction to Angular CLI.pptx
Malla Reddy University
 
TypeScript - All you ever wanted to know - Tech Talk by Epic Labs
TypeScript - All you ever wanted to know - Tech Talk by Epic Labs
Alfonso Peletier
 
Ad

More from Gil Fink (20)

Becoming a Tech Speaker
Becoming a Tech Speaker
Gil Fink
 
Web animation on steroids web animation api
Web animation on steroids web animation api
Gil Fink
 
The Time for Vanilla Web Components has Arrived
The Time for Vanilla Web Components has Arrived
Gil Fink
 
Stencil the time for vanilla web components has arrived
Stencil the time for vanilla web components has arrived
Gil Fink
 
Stencil the time for vanilla web components has arrived
Stencil the time for vanilla web components has arrived
Gil Fink
 
Stencil: The Time for Vanilla Web Components has Arrived
Stencil: The Time for Vanilla Web Components has Arrived
Gil Fink
 
Stencil the time for vanilla web components has arrived
Stencil the time for vanilla web components has arrived
Gil Fink
 
Being a tech speaker
Being a tech speaker
Gil Fink
 
Working with Data in Service Workers
Working with Data in Service Workers
Gil Fink
 
Demystifying Angular Animations
Demystifying Angular Animations
Gil Fink
 
Redux data flow with angular
Redux data flow with angular
Gil Fink
 
Redux data flow with angular
Redux data flow with angular
Gil Fink
 
Who's afraid of front end databases?
Who's afraid of front end databases?
Gil Fink
 
Web component driven development
Web component driven development
Gil Fink
 
Web components
Web components
Gil Fink
 
Redux data flow with angular 2
Redux data flow with angular 2
Gil Fink
 
Biological Modeling, Powered by AngularJS
Biological Modeling, Powered by AngularJS
Gil Fink
 
Who's afraid of front end databases
Who's afraid of front end databases
Gil Fink
 
Biological modeling, powered by angular js
Biological modeling, powered by angular js
Gil Fink
 
Web components the future is here
Web components the future is here
Gil Fink
 
Becoming a Tech Speaker
Becoming a Tech Speaker
Gil Fink
 
Web animation on steroids web animation api
Web animation on steroids web animation api
Gil Fink
 
The Time for Vanilla Web Components has Arrived
The Time for Vanilla Web Components has Arrived
Gil Fink
 
Stencil the time for vanilla web components has arrived
Stencil the time for vanilla web components has arrived
Gil Fink
 
Stencil the time for vanilla web components has arrived
Stencil the time for vanilla web components has arrived
Gil Fink
 
Stencil: The Time for Vanilla Web Components has Arrived
Stencil: The Time for Vanilla Web Components has Arrived
Gil Fink
 
Stencil the time for vanilla web components has arrived
Stencil the time for vanilla web components has arrived
Gil Fink
 
Being a tech speaker
Being a tech speaker
Gil Fink
 
Working with Data in Service Workers
Working with Data in Service Workers
Gil Fink
 
Demystifying Angular Animations
Demystifying Angular Animations
Gil Fink
 
Redux data flow with angular
Redux data flow with angular
Gil Fink
 
Redux data flow with angular
Redux data flow with angular
Gil Fink
 
Who's afraid of front end databases?
Who's afraid of front end databases?
Gil Fink
 
Web component driven development
Web component driven development
Gil Fink
 
Web components
Web components
Gil Fink
 
Redux data flow with angular 2
Redux data flow with angular 2
Gil Fink
 
Biological Modeling, Powered by AngularJS
Biological Modeling, Powered by AngularJS
Gil Fink
 
Who's afraid of front end databases
Who's afraid of front end databases
Gil Fink
 
Biological modeling, powered by angular js
Biological modeling, powered by angular js
Gil Fink
 
Web components the future is here
Web components the future is here
Gil Fink
 

Recently uploaded (20)

Oracle Cloud Infrastructure Generative AI Professional
Oracle Cloud Infrastructure Generative AI Professional
VICTOR MAESTRE RAMIREZ
 
Artificial Intelligence in the Nonprofit Boardroom.pdf
Artificial Intelligence in the Nonprofit Boardroom.pdf
OnBoard
 
“Addressing Evolving AI Model Challenges Through Memory and Storage,” a Prese...
“Addressing Evolving AI Model Challenges Through Memory and Storage,” a Prese...
Edge AI and Vision Alliance
 
“Why It’s Critical to Have an Integrated Development Methodology for Edge AI,...
“Why It’s Critical to Have an Integrated Development Methodology for Edge AI,...
Edge AI and Vision Alliance
 
FIDO Seminar: Perspectives on Passkeys & Consumer Adoption.pptx
FIDO Seminar: Perspectives on Passkeys & Consumer Adoption.pptx
FIDO Alliance
 
cnc-drilling-dowel-inserting-machine-drillteq-d-510-english.pdf
cnc-drilling-dowel-inserting-machine-drillteq-d-510-english.pdf
AmirStern2
 
No-Code Workflows for CAD & 3D Data: Scaling AI-Driven Infrastructure
No-Code Workflows for CAD & 3D Data: Scaling AI-Driven Infrastructure
Safe Software
 
FIDO Seminar: Evolving Landscape of Post-Quantum Cryptography.pptx
FIDO Seminar: Evolving Landscape of Post-Quantum Cryptography.pptx
FIDO Alliance
 
Mastering AI Workflows with FME - Peak of Data & AI 2025
Mastering AI Workflows with FME - Peak of Data & AI 2025
Safe Software
 
FME for Distribution & Transmission Integrity Management Program (DIMP & TIMP)
FME for Distribution & Transmission Integrity Management Program (DIMP & TIMP)
Safe Software
 
FIDO Alliance Seminar State of Passkeys.pptx
FIDO Alliance Seminar State of Passkeys.pptx
FIDO Alliance
 
Integration of Utility Data into 3D BIM Models Using a 3D Solids Modeling Wor...
Integration of Utility Data into 3D BIM Models Using a 3D Solids Modeling Wor...
Safe Software
 
National Fuels Treatments Initiative: Building a Seamless Map of Hazardous Fu...
National Fuels Treatments Initiative: Building a Seamless Map of Hazardous Fu...
Safe Software
 
Murdledescargadarkweb.pdfvolumen1 100 elementary
Murdledescargadarkweb.pdfvolumen1 100 elementary
JorgeSemperteguiMont
 
Down the Rabbit Hole – Solving 5 Training Roadblocks
Down the Rabbit Hole – Solving 5 Training Roadblocks
Rustici Software
 
Enabling BIM / GIS integrations with Other Systems with FME
Enabling BIM / GIS integrations with Other Systems with FME
Safe Software
 
PyData - Graph Theory for Multi-Agent Integration
PyData - Graph Theory for Multi-Agent Integration
barqawicloud
 
ENERGY CONSUMPTION CALCULATION IN ENERGY-EFFICIENT AIR CONDITIONER.pdf
ENERGY CONSUMPTION CALCULATION IN ENERGY-EFFICIENT AIR CONDITIONER.pdf
Muhammad Rizwan Akram
 
Kubernetes Security Act Now Before It’s Too Late
Kubernetes Security Act Now Before It’s Too Late
Michael Furman
 
Edge-banding-machines-edgeteq-s-200-en-.pdf
Edge-banding-machines-edgeteq-s-200-en-.pdf
AmirStern2
 
Oracle Cloud Infrastructure Generative AI Professional
Oracle Cloud Infrastructure Generative AI Professional
VICTOR MAESTRE RAMIREZ
 
Artificial Intelligence in the Nonprofit Boardroom.pdf
Artificial Intelligence in the Nonprofit Boardroom.pdf
OnBoard
 
“Addressing Evolving AI Model Challenges Through Memory and Storage,” a Prese...
“Addressing Evolving AI Model Challenges Through Memory and Storage,” a Prese...
Edge AI and Vision Alliance
 
“Why It’s Critical to Have an Integrated Development Methodology for Edge AI,...
“Why It’s Critical to Have an Integrated Development Methodology for Edge AI,...
Edge AI and Vision Alliance
 
FIDO Seminar: Perspectives on Passkeys & Consumer Adoption.pptx
FIDO Seminar: Perspectives on Passkeys & Consumer Adoption.pptx
FIDO Alliance
 
cnc-drilling-dowel-inserting-machine-drillteq-d-510-english.pdf
cnc-drilling-dowel-inserting-machine-drillteq-d-510-english.pdf
AmirStern2
 
No-Code Workflows for CAD & 3D Data: Scaling AI-Driven Infrastructure
No-Code Workflows for CAD & 3D Data: Scaling AI-Driven Infrastructure
Safe Software
 
FIDO Seminar: Evolving Landscape of Post-Quantum Cryptography.pptx
FIDO Seminar: Evolving Landscape of Post-Quantum Cryptography.pptx
FIDO Alliance
 
Mastering AI Workflows with FME - Peak of Data & AI 2025
Mastering AI Workflows with FME - Peak of Data & AI 2025
Safe Software
 
FME for Distribution & Transmission Integrity Management Program (DIMP & TIMP)
FME for Distribution & Transmission Integrity Management Program (DIMP & TIMP)
Safe Software
 
FIDO Alliance Seminar State of Passkeys.pptx
FIDO Alliance Seminar State of Passkeys.pptx
FIDO Alliance
 
Integration of Utility Data into 3D BIM Models Using a 3D Solids Modeling Wor...
Integration of Utility Data into 3D BIM Models Using a 3D Solids Modeling Wor...
Safe Software
 
National Fuels Treatments Initiative: Building a Seamless Map of Hazardous Fu...
National Fuels Treatments Initiative: Building a Seamless Map of Hazardous Fu...
Safe Software
 
Murdledescargadarkweb.pdfvolumen1 100 elementary
Murdledescargadarkweb.pdfvolumen1 100 elementary
JorgeSemperteguiMont
 
Down the Rabbit Hole – Solving 5 Training Roadblocks
Down the Rabbit Hole – Solving 5 Training Roadblocks
Rustici Software
 
Enabling BIM / GIS integrations with Other Systems with FME
Enabling BIM / GIS integrations with Other Systems with FME
Safe Software
 
PyData - Graph Theory for Multi-Agent Integration
PyData - Graph Theory for Multi-Agent Integration
barqawicloud
 
ENERGY CONSUMPTION CALCULATION IN ENERGY-EFFICIENT AIR CONDITIONER.pdf
ENERGY CONSUMPTION CALCULATION IN ENERGY-EFFICIENT AIR CONDITIONER.pdf
Muhammad Rizwan Akram
 
Kubernetes Security Act Now Before It’s Too Late
Kubernetes Security Act Now Before It’s Too Late
Michael Furman
 
Edge-banding-machines-edgeteq-s-200-en-.pdf
Edge-banding-machines-edgeteq-s-200-en-.pdf
AmirStern2
 

Building End to-End Web Apps Using TypeScript

  • 1. Building End-to-End Web Apps Using TypeScript Gil Fink Senior Architect SELA
  • 2. Agenda The Why Introduction to TypeScript Building a Simple App with TypeScript Q&A Summary
  • 3. Wait! JavaScript End to End? "JavaScript is the Assembly Language of the Web" - Erik Meijer “you can write large programs in JavaScript. You just can’t maintain them” - Anders Hejlsberg
  • 4. JavaScript Benefits Powerful language: Functional Object oriented Dynamic Great runtimes Huge community Tons of libraries Tools But it also includes a lot of bad parts
  • 5. The Alternatives We have several alternatives: Hard core JavaScript development CoffeeScript – http://coffeescript.org Dart – http://dartlang.org Clojurescript https://github.com/clojure/clojurescript Script# - http://scriptsharp.com/
  • 6. What is TypeScript? “TypeScript is a typed superset of JavaScript that compiles to plain JavaScript” ~typescriptlang.org 6
  • 8. TypeScript Key Features Support standard JavaScript code with static typing Encapsulation through classes and modules Support for constructors, properties and functions Interfaces and enums support Lambda support => and generics Intellisense and syntax checking 8
  • 9. From TypeScript to JavaScript TypeScript Code JavaScript Code TypeScript Compiler class Greeter { greeting: string; constructor(message: string) { this.greeting = message; } tsc greet() { return “Hi," + this.greeting; } var Greeter = (function () { function Greeter(message) { this.greeting = message; } Greeter.prototype.greet = function () { return “Hi," + this.greeting; }; return Greeter; })(); } 9
  • 10. TypeScript Type Annotations You can add type annotations to variables and functions var str : string = ‘hello’; // str is annotated as string function foo(name: string) : string { // both parameter and function annotated return ‘hello’ + name; } 10
  • 11. Classes and Interfaces You can define classes You can define interfaces and implement them later interface IGreeter { greet(): void; } var Greeter = (function () { function Greeter() { } class Greeter implements IGreeter{ greeting: string; Greeter.prototype.greet = function () { console.log(this.greeting); greet() { console.log(this.greeting); } } }; return Greeter; })();
  • 12. Modules You define modules to wrap classes, interfaces and functionality module app { export interface IGreeter { greet(): void; export class Greeter implements IGreeter { greeting: string; greet() { console.log(this.greeting); } } (function (app) { var Greeter = (function () { function Greeter() { } } var app; } Greeter.prototype.greet = function () { console.log(this.greeting); }; return Greeter; })(); app.Greeter = Greeter; })(app || (app = {}));
  • 13. Building a Simple End-to-End App with TypeScript Demo
  • 15. Summary • • Open source language that compiles into JavaScript Key features: • Code encapsulation • Maintainable code • Tooling support • Learn TypeScript today!
  • 16. Resources Session slide deck and demos – http://sdrv.ms/18SDF8r TypeScript – http://www.typescriptlang.org My Website – http://www.gilfink.net Follow me on Twitter – @gilfink
  • 17. THANK YOU Gil Fink Senior Architect [email protected] @gilfink http://www.gilfink.net