SlideShare a Scribd company logo
meetup.com/javascript-israel
SUBMIT YOUR LECTURE:
facebook.com/groups/jsisrae
http://bit.ly/jsil-apply
Thanks To Our Sponsors:
SUPPORT THE COMMUNITY:
http://bit.ly/jsil-sponsor
INTRO TO TYPESCRIPT
LANGUAGE
Gil Fink
sparXys CEO
About Me
• sparXys CEO and senior consultant
• ASP.NET/IIS Microsoft MVP in the last 7 years
• Pro Single Page Application Development (Apress)
co-author
• 4 Microsoft Official Courses (MOCs) co-author
• GDG Rashlatz and ng-conf Israel co-organizer
Agenda
• The Why
• TypeScript Language Features
• Summary
Getting Started with TypeScript
"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 isn’t Really Bad
• JavaScript is really a powerful language:
o Functional
o Dynamic
o Can run everywhere
• Huge community
• Libraries
• Tools
o IDEs
o Debuggers
o Test tools
Some Alternatives
• We have several alternatives:
• Hard core JavaScript development – my Stockholm syndrome
• JavaScript preprocessors/transpilers
• 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
Hello TypeScript
Demo
TypeScript is Very
Flexible
Any Browser Any Host
Any OS Tools Support
Some 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 and
generics
support
Intellisense
and syntax
checking
• Modules
• Classes
• Arrow functions
• Default parameters
• Destructuring
• Spread and rest
• Let and const
• for...of
• Object literal
methods
• Shorthand
properties
• Computed
properties
• Octal / binary
literals
• Symbols
• Template strings
Features from the near Future of
the Web (ES2015/6), Today
Choose your
compilation scenario.
It is up to you!
From TypeScript to
JavaScript
15
class Greeter {
greeting: string;
constructor(message: string) {
this.greeting = message;
}
greet() {
return “Hi," + this.greeting;
}
}
TypeScript Code JavaScript Code
TypeScript
Compiler
var Greeter = (function () {
function Greeter(message) {
this.greeting = message;
}
Greeter.prototype.greet =
function () {
return “Hi," + this.greeting;
};
return Greeter;
})();
tsc.js
How Good is TypeScript’s
Output?
Some Important Side
Notes
• All JavaScript code IS TypeScript code
• All JavaScript libraries work with TypeScript
Defintely Typed
https://github.com/DefinitelyTyped/DefinitelyTyped
Demo
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 { // parameter and function annotated
return ‘hello’ + name;
}
TypeScript Types
Classes and Interfaces
• You can define classes
• You can define interfaces
o And implement them later or use to infer typing
interface IGreeter {
greet(): void;
}
class Greeter implements IGreeter{
greeting: string;
greet() {
console.log(this.greeting);
}
}
var Greeter = (function () {
function Greeter() {
}
Greeter.prototype.greet = function () {
console.log(this.greeting);
};
return Greeter;
})();
Modules
• You define modules to wrap classes, interfaces and
functions
• Use import and export keywords
•module app {
export interface IGreeter {
greet(): void;
}
export class Greeter implements IGreeter {
greeting: string;
greet() {
console.log(this.greeting);
}
}
}
var app;
(function (app) {
var Greeter = (function () {
function Greeter() {
}
Greeter.prototype.greet = function () {
console.log(this.greeting);
};
return Greeter;
})();
app.Greeter = Greeter;
})(app || (app = {}));
Classes, Modules and Interfaces
Demo
Angular 2: Built with
TypeScript
• http://blogs.msdn.com/b/typescript/archive/2015/03/05/ang
ular-2-0-built-on-typescript.aspx
• http://blogs.msdn.com/b/visualstudio/archive/2015/03/12/a
-preview-of-angular-2-and-typescript-in-visual-studio.aspx
TypeScript Versions
• TypeScript 1.0 – 1.6
• TypeScript 1.7
o Async/Await for ES6 targets
o Polymorphic this Typing
o ES6 Module Emitting
o ES7 Exponentiation
• Current version: TypeScript 1.8
o Released two days ago (22.2)
Questions?
Summary
• Open source language that compiles into
JavaScript
• Key features:
• Code encapsulation
• Maintainable code
• Tooling support
• Learn TypeScript today!
Resources
• TypeScript – http://www.typescriptlang.org
• TypeScript Source Code -
https://github.com/Microsoft/TypeScript
• Definitely Typed –
https://github.com/borisyankov/DefinitelyTyped
• My Website – http://www.gilfink.net
• Follow me on Twitter – @gilfink
Thank You!

More Related Content

PPTX
Typescript ppt
PPTX
PDF
TypeScript: coding JavaScript without the pain
PPTX
TypeScript Modules
PPTX
Typescript Fundamentals
PPTX
Typescript in 30mins
PPTX
TypeScript intro
Typescript ppt
TypeScript: coding JavaScript without the pain
TypeScript Modules
Typescript Fundamentals
Typescript in 30mins
TypeScript intro

What's hot (20)

PPTX
TypeScript . the JavaScript developer best friend!
PDF
Power Leveling your TypeScript
PPTX
Type script - advanced usage and practices
PPTX
Introducing type script
PPT
Learning typescript
PPTX
AngularConf2015
PPTX
Introduction about type script
PPTX
TypeScript: Basic Features and Compilation Guide
PPT
TypeScript Presentation
PDF
Introduction to TypeScript by Winston Levi
PDF
TypeScript Best Practices
PDF
TypeScript - An Introduction
PDF
TypeScript introduction to scalable javascript application
PDF
TypeScript: Angular's Secret Weapon
PPTX
TypeScript Overview
PPTX
TypeScript 101
PDF
Typescript: enjoying large scale browser development
PPTX
Typescript
PPTX
Getting started with typescript
PDF
Typescript for the programmers who like javascript
TypeScript . the JavaScript developer best friend!
Power Leveling your TypeScript
Type script - advanced usage and practices
Introducing type script
Learning typescript
AngularConf2015
Introduction about type script
TypeScript: Basic Features and Compilation Guide
TypeScript Presentation
Introduction to TypeScript by Winston Levi
TypeScript Best Practices
TypeScript - An Introduction
TypeScript introduction to scalable javascript application
TypeScript: Angular's Secret Weapon
TypeScript Overview
TypeScript 101
Typescript: enjoying large scale browser development
Typescript
Getting started with typescript
Typescript for the programmers who like javascript
Ad

Viewers also liked (19)

PPTX
TypeScript DevSum 2013
PPTX
TypeScript
PPTX
Double page spread stages powerpoint
PDF
Through the Roof!
DOC
Resume - Updated 14.08.15
PPTX
Derecho humano
PPTX
A Sheep Before Slaughter
PPT
Distance education in B.Sc in Zoology UP,Noida @9278888356
PPT
example images_captions ch 1-9
PDF
CertificaatSOM
PPTX
Unidad vi pROCESO DE cAMBIO INSTITUCIONAL
PDF
Capital Power June 2016 Investor Meetings
PDF
Trouble With Tenants
PPTX
Building Angular 2.0 applications with TypeScript
PPTX
Typescript - a JS superset
PDF
Upgrading JavaScript to ES6 and using TypeScript as a shortcut
PPTX
Why do we need TypeScript?
PDF
TypeScript Introduction
PDF
Александр Русаков - TypeScript 2 in action
TypeScript DevSum 2013
TypeScript
Double page spread stages powerpoint
Through the Roof!
Resume - Updated 14.08.15
Derecho humano
A Sheep Before Slaughter
Distance education in B.Sc in Zoology UP,Noida @9278888356
example images_captions ch 1-9
CertificaatSOM
Unidad vi pROCESO DE cAMBIO INSTITUCIONAL
Capital Power June 2016 Investor Meetings
Trouble With Tenants
Building Angular 2.0 applications with TypeScript
Typescript - a JS superset
Upgrading JavaScript to ES6 and using TypeScript as a shortcut
Why do we need TypeScript?
TypeScript Introduction
Александр Русаков - TypeScript 2 in action
Ad

Similar to Getting Started with TypeScript (20)

PDF
Getting Started with the TypeScript Language
PDF
One language to rule them all type script
PDF
End-to-End SPA Development using TypeScript
PDF
End to-end apps with type script
PDF
Building End to-End Web Apps Using TypeScript
PDF
Building End-to-End Apps Using Typescript
PDF
Introduction to TypeScript
PPTX
TypeScript-SPS-melb.pptx
PPTX
TypeScript Introduction
PPTX
Type script
PPTX
Typescript: JS code just got better!
PPTX
Intro to TypeScript, HTML5DevConf Oct 2013
PDF
Type script
PDF
One language to rule them all type script
PPTX
GraphQL - The new "Lingua Franca" for API-Development
PPTX
Welcome to React.pptx
PPT
TypeScript for Alfresco and CMIS - Alfresco DevCon 2012 San Jose
PPTX
Type script
PDF
Mini-Training: TypeScript
PDF
The Characteristics of a Successful SPA
Getting Started with the TypeScript Language
One language to rule them all type script
End-to-End SPA Development using TypeScript
End to-end apps with type script
Building End to-End Web Apps Using TypeScript
Building End-to-End Apps Using Typescript
Introduction to TypeScript
TypeScript-SPS-melb.pptx
TypeScript Introduction
Type script
Typescript: JS code just got better!
Intro to TypeScript, HTML5DevConf Oct 2013
Type script
One language to rule them all type script
GraphQL - The new "Lingua Franca" for API-Development
Welcome to React.pptx
TypeScript for Alfresco and CMIS - Alfresco DevCon 2012 San Jose
Type script
Mini-Training: TypeScript
The Characteristics of a Successful SPA

More from Gil Fink (20)

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

Recently uploaded (20)

PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Encapsulation theory and applications.pdf
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PPTX
A Presentation on Artificial Intelligence
PDF
Approach and Philosophy of On baking technology
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PPTX
Big Data Technologies - Introduction.pptx
PPTX
Machine Learning_overview_presentation.pptx
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Diabetes mellitus diagnosis method based random forest with bat algorithm
gpt5_lecture_notes_comprehensive_20250812015547.pdf
Digital-Transformation-Roadmap-for-Companies.pptx
Network Security Unit 5.pdf for BCA BBA.
Encapsulation theory and applications.pdf
“AI and Expert System Decision Support & Business Intelligence Systems”
Review of recent advances in non-invasive hemoglobin estimation
Spectral efficient network and resource selection model in 5G networks
Building Integrated photovoltaic BIPV_UPV.pdf
A Presentation on Artificial Intelligence
Approach and Philosophy of On baking technology
Mobile App Security Testing_ A Comprehensive Guide.pdf
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Unlocking AI with Model Context Protocol (MCP)
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Assigned Numbers - 2025 - Bluetooth® Document
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Big Data Technologies - Introduction.pptx
Machine Learning_overview_presentation.pptx
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton

Getting Started with TypeScript

  • 1. meetup.com/javascript-israel SUBMIT YOUR LECTURE: facebook.com/groups/jsisrae http://bit.ly/jsil-apply Thanks To Our Sponsors: SUPPORT THE COMMUNITY: http://bit.ly/jsil-sponsor
  • 3. About Me • sparXys CEO and senior consultant • ASP.NET/IIS Microsoft MVP in the last 7 years • Pro Single Page Application Development (Apress) co-author • 4 Microsoft Official Courses (MOCs) co-author • GDG Rashlatz and ng-conf Israel co-organizer
  • 4. Agenda • The Why • TypeScript Language Features • Summary
  • 6. "JavaScript is the assembly language of the Web" Erik Meijer
  • 7. “You can write large programs in JavaScript. You just can’t maintain them” Anders Hejlsberg
  • 8. JavaScript isn’t Really Bad • JavaScript is really a powerful language: o Functional o Dynamic o Can run everywhere • Huge community • Libraries • Tools o IDEs o Debuggers o Test tools
  • 9. Some Alternatives • We have several alternatives: • Hard core JavaScript development – my Stockholm syndrome • JavaScript preprocessors/transpilers • CoffeeScript – http://coffeescript.org • Dart – http://dartlang.org • Clojurescript - https://github.com/clojure/clojurescript • Script# - http://scriptsharp.com/
  • 10. What is TypeScript? “TypeScript is a typed superset of JavaScript that compiles to plain JavaScript” ~typescriptlang.org
  • 12. TypeScript is Very Flexible Any Browser Any Host Any OS Tools Support
  • 13. Some 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 and generics support Intellisense and syntax checking
  • 14. • Modules • Classes • Arrow functions • Default parameters • Destructuring • Spread and rest • Let and const • for...of • Object literal methods • Shorthand properties • Computed properties • Octal / binary literals • Symbols • Template strings Features from the near Future of the Web (ES2015/6), Today Choose your compilation scenario. It is up to you!
  • 15. From TypeScript to JavaScript 15 class Greeter { greeting: string; constructor(message: string) { this.greeting = message; } greet() { return “Hi," + this.greeting; } } TypeScript Code JavaScript Code TypeScript Compiler var Greeter = (function () { function Greeter(message) { this.greeting = message; } Greeter.prototype.greet = function () { return “Hi," + this.greeting; }; return Greeter; })(); tsc.js
  • 16. How Good is TypeScript’s Output?
  • 17. Some Important Side Notes • All JavaScript code IS TypeScript code • All JavaScript libraries work with TypeScript
  • 19. 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 { // parameter and function annotated return ‘hello’ + name; }
  • 21. Classes and Interfaces • You can define classes • You can define interfaces o And implement them later or use to infer typing interface IGreeter { greet(): void; } class Greeter implements IGreeter{ greeting: string; greet() { console.log(this.greeting); } } var Greeter = (function () { function Greeter() { } Greeter.prototype.greet = function () { console.log(this.greeting); }; return Greeter; })();
  • 22. Modules • You define modules to wrap classes, interfaces and functions • Use import and export keywords •module app { export interface IGreeter { greet(): void; } export class Greeter implements IGreeter { greeting: string; greet() { console.log(this.greeting); } } } var app; (function (app) { var Greeter = (function () { function Greeter() { } Greeter.prototype.greet = function () { console.log(this.greeting); }; return Greeter; })(); app.Greeter = Greeter; })(app || (app = {}));
  • 23. Classes, Modules and Interfaces Demo
  • 24. Angular 2: Built with TypeScript • http://blogs.msdn.com/b/typescript/archive/2015/03/05/ang ular-2-0-built-on-typescript.aspx • http://blogs.msdn.com/b/visualstudio/archive/2015/03/12/a -preview-of-angular-2-and-typescript-in-visual-studio.aspx
  • 25. TypeScript Versions • TypeScript 1.0 – 1.6 • TypeScript 1.7 o Async/Await for ES6 targets o Polymorphic this Typing o ES6 Module Emitting o ES7 Exponentiation • Current version: TypeScript 1.8 o Released two days ago (22.2)
  • 27. Summary • Open source language that compiles into JavaScript • Key features: • Code encapsulation • Maintainable code • Tooling support • Learn TypeScript today!
  • 28. Resources • TypeScript – http://www.typescriptlang.org • TypeScript Source Code - https://github.com/Microsoft/TypeScript • Definitely Typed – https://github.com/borisyankov/DefinitelyTyped • My Website – http://www.gilfink.net • Follow me on Twitter – @gilfink