SlideShare uma empresa Scribd logo
1 de 13
TypeScript 101



Ross Terman
www.xeq.com
rterman@xeq.comt
ed by Ross Terman
What is TypeScript
TypeScript is a superset of JavaScript
You can enter pure JavaScript into TypeScript
TypeScript gives you type safety.
TypeScript gives you encapsulation.
TypeScript allows you to organize your code into Modules and Classes
Get TypeScript
www.TypeScriptLang.org
http://www.typescriptlang.org/Content/TypeScript
%20Language%20Specification.pdf
Web Essentials
TypeScript Features
• Standard JavaScript Code
• Static Typing
• Encapsulation with Modules and Classes
• Classes support Constructors, Properties,
  Fields and Functions
• Interfaces
• Lambda Functions =>
• Intellisense and syntax checking
Additional Keywords and Operators
 exports and imports
constructor
extends
implements
Interface
public/private
… Rest syntax
=> Arrow or lambda functions
<typename> type conversion
: assignment
Code Hierarchy
                  Module



    Interface      Class



                   Fields
                Constructors
                 Properties
                 Functions
Types
Type Inference
Annotations
Type Definition Files
Primitive Types: Number, String, Boolean, Any, Null, Undefined
Object Types
Functions
Parameters – Required and Optional


Arrow (lambda) functions


Void for functions that return no value
Classes
Class Members – Fields, Properties, Functions, Constructors
Add functions to a class. Note lack of function keyword
Define properties
Complex Types (object types) – Instantiate with New keyword
Types can be cast
https://github.com/borisyankov/DefinetlyTyped
Extending Types – super() function. Similar to base
Immediately-invoked function expression – iffy
Interfaces
Optional members
Implementing
Using an Interface as a type
Extend interface
Modules
Benefits – Separation of concern, maintainable, testable, reusable
Open – Can be exposed for both Import and Export
Asynchronous Module Definition - AMD
Resources

http://www/typescriptlang.org
http://www.typescriptlang.org/Content/TypeScript%20Language%20Specifica
tion.pdf
http://www.johnpapa.net/
http://weblogs.asp.net/dwahlin/
http://pluralsight.com/training/
Contact Us
Ross Terman – 305-726-6925
rterman@xeq.com
@xeqinfo

Mais conteúdo relacionado

Mais procurados

TypeScript Presentation
TypeScript PresentationTypeScript Presentation
TypeScript Presentation
Patrick John Pacaña
 

Mais procurados (20)

TypeScript Overview
TypeScript OverviewTypeScript Overview
TypeScript Overview
 
Getting Started with TypeScript
Getting Started with TypeScriptGetting Started with TypeScript
Getting Started with TypeScript
 
TypeScript Modules
TypeScript ModulesTypeScript Modules
TypeScript Modules
 
Introducing type script
Introducing type scriptIntroducing type script
Introducing type script
 
TypeScript: coding JavaScript without the pain
TypeScript: coding JavaScript without the painTypeScript: coding JavaScript without the pain
TypeScript: coding JavaScript without the pain
 
Power Leveling your TypeScript
Power Leveling your TypeScriptPower Leveling your TypeScript
Power Leveling your TypeScript
 
Introduction to TypeScript by Winston Levi
Introduction to TypeScript by Winston LeviIntroduction to TypeScript by Winston Levi
Introduction to TypeScript by Winston Levi
 
Type script - advanced usage and practices
Type script  - advanced usage and practicesType script  - advanced usage and practices
Type script - advanced usage and practices
 
TypeScript Best Practices
TypeScript Best PracticesTypeScript Best Practices
TypeScript Best Practices
 
Typescript Fundamentals
Typescript FundamentalsTypescript Fundamentals
Typescript Fundamentals
 
TypeScript Presentation
TypeScript PresentationTypeScript Presentation
TypeScript Presentation
 
TypeScript: Angular's Secret Weapon
TypeScript: Angular's Secret WeaponTypeScript: Angular's Secret Weapon
TypeScript: Angular's Secret Weapon
 
Getting started with typescript
Getting started with typescriptGetting started with typescript
Getting started with typescript
 
TypeScript
TypeScriptTypeScript
TypeScript
 
Typescript 101 introduction
Typescript 101   introductionTypescript 101   introduction
Typescript 101 introduction
 
TypeScript - An Introduction
TypeScript - An IntroductionTypeScript - An Introduction
TypeScript - An Introduction
 
Typescript
TypescriptTypescript
Typescript
 
TypeScript for Java Developers
TypeScript for Java DevelopersTypeScript for Java Developers
TypeScript for Java Developers
 
TypeScript - Silver Bullet for the Full-stack Developers
TypeScript - Silver Bullet for the Full-stack DevelopersTypeScript - Silver Bullet for the Full-stack Developers
TypeScript - Silver Bullet for the Full-stack Developers
 
Typescript for the programmers who like javascript
Typescript for the programmers who like javascriptTypescript for the programmers who like javascript
Typescript for the programmers who like javascript
 

Destaque

Centennial canberra - quality of life and urban planning workshop presentation
Centennial canberra - quality of life and urban planning workshop presentationCentennial canberra - quality of life and urban planning workshop presentation
Centennial canberra - quality of life and urban planning workshop presentation
hitominakanishi
 
Study of new town canberra, australia
Study of new town   canberra, australiaStudy of new town   canberra, australia
Study of new town canberra, australia
Jamuna Nataraju
 
Распознавание дефектов рельсов
Распознавание дефектов рельсовРаспознавание дефектов рельсов
Распознавание дефектов рельсов
kulibin
 
Presentación sobre autores por María Gabriela nichita y Evelyn Flores Gutiérrez
Presentación sobre autores por María Gabriela nichita y Evelyn Flores GutiérrezPresentación sobre autores por María Gabriela nichita y Evelyn Flores Gutiérrez
Presentación sobre autores por María Gabriela nichita y Evelyn Flores Gutiérrez
sextoBLucena
 
Bamboo flute playing
Bamboo flute playingBamboo flute playing
Bamboo flute playing
S Marley
 
Basic Bamboo Flute Manual
Basic Bamboo Flute ManualBasic Bamboo Flute Manual
Basic Bamboo Flute Manual
Gaban Merah
 
Pólya Tibor: Regresszív Képzeleti Szótár - Narratív Kategoriális Tartalomelemző
Pólya Tibor: Regresszív Képzeleti Szótár - Narratív Kategoriális TartalomelemzőPólya Tibor: Regresszív Képzeleti Szótár - Narratív Kategoriális Tartalomelemző
Pólya Tibor: Regresszív Képzeleti Szótár - Narratív Kategoriális Tartalomelemző
Zoltan Varju
 

Destaque (20)

Centennial canberra - quality of life and urban planning workshop presentation
Centennial canberra - quality of life and urban planning workshop presentationCentennial canberra - quality of life and urban planning workshop presentation
Centennial canberra - quality of life and urban planning workshop presentation
 
Colorgy - 校園 Open API 平台
Colorgy - 校園 Open API 平台Colorgy - 校園 Open API 平台
Colorgy - 校園 Open API 平台
 
Study of new town canberra, australia
Study of new town   canberra, australiaStudy of new town   canberra, australia
Study of new town canberra, australia
 
Распознавание дефектов рельсов
Распознавание дефектов рельсовРаспознавание дефектов рельсов
Распознавание дефектов рельсов
 
Energy Policy after the UK General Election: Priorities for consumers
Energy Policy after the UK General Election: Priorities for consumersEnergy Policy after the UK General Election: Priorities for consumers
Energy Policy after the UK General Election: Priorities for consumers
 
Prelims
PrelimsPrelims
Prelims
 
Certificado
CertificadoCertificado
Certificado
 
Presentación sobre autores por María Gabriela nichita y Evelyn Flores Gutiérrez
Presentación sobre autores por María Gabriela nichita y Evelyn Flores GutiérrezPresentación sobre autores por María Gabriela nichita y Evelyn Flores Gutiérrez
Presentación sobre autores por María Gabriela nichita y Evelyn Flores Gutiérrez
 
Text4baby in Marketing Health Services Magazine
Text4baby in Marketing Health Services MagazineText4baby in Marketing Health Services Magazine
Text4baby in Marketing Health Services Magazine
 
Bamboo flute playing
Bamboo flute playingBamboo flute playing
Bamboo flute playing
 
Resume Format
Resume FormatResume Format
Resume Format
 
Red foods
Red foodsRed foods
Red foods
 
Basic Bamboo Flute Manual
Basic Bamboo Flute ManualBasic Bamboo Flute Manual
Basic Bamboo Flute Manual
 
Pólya Tibor: Regresszív Képzeleti Szótár - Narratív Kategoriális Tartalomelemző
Pólya Tibor: Regresszív Képzeleti Szótár - Narratív Kategoriális TartalomelemzőPólya Tibor: Regresszív Képzeleti Szótár - Narratív Kategoriális Tartalomelemző
Pólya Tibor: Regresszív Képzeleti Szótár - Narratív Kategoriális Tartalomelemző
 
Introduction to Twitter Bootstrap 3.0.3
Introduction to Twitter Bootstrap 3.0.3Introduction to Twitter Bootstrap 3.0.3
Introduction to Twitter Bootstrap 3.0.3
 
Jornal CTB 2016 01-20-n6-ano9
Jornal CTB 2016 01-20-n6-ano9Jornal CTB 2016 01-20-n6-ano9
Jornal CTB 2016 01-20-n6-ano9
 
Featuring Google: Quality Score 2013
Featuring Google: Quality Score 2013Featuring Google: Quality Score 2013
Featuring Google: Quality Score 2013
 
Кто такой аналитик (хороший)?
Кто такой аналитик (хороший)?Кто такой аналитик (хороший)?
Кто такой аналитик (хороший)?
 
クラウド事業者のためのクラウドセキュリティ(公開用)
クラウド事業者のためのクラウドセキュリティ(公開用)クラウド事業者のためのクラウドセキュリティ(公開用)
クラウド事業者のためのクラウドセキュリティ(公開用)
 
Scrum In Action - Algiers Tech Meetup
Scrum In Action - Algiers Tech MeetupScrum In Action - Algiers Tech Meetup
Scrum In Action - Algiers Tech Meetup
 

Semelhante a TypeScript 101

C#3.0 & Vb 9.0 New Features
C#3.0 & Vb 9.0 New FeaturesC#3.0 & Vb 9.0 New Features
C#3.0 & Vb 9.0 New Features
techfreak
 
New c sharp3_features_(linq)_part_iv
New c sharp3_features_(linq)_part_ivNew c sharp3_features_(linq)_part_iv
New c sharp3_features_(linq)_part_iv
Nico Ludwig
 
NNUG Certification Presentation
NNUG Certification PresentationNNUG Certification Presentation
NNUG Certification Presentation
Niall Merrigan
 

Semelhante a TypeScript 101 (20)

Functional Programming In Jdk8
Functional Programming In Jdk8 Functional Programming In Jdk8
Functional Programming In Jdk8
 
The advantage of developing with TypeScript
The advantage of developing with TypeScript The advantage of developing with TypeScript
The advantage of developing with TypeScript
 
csharp.docx
csharp.docxcsharp.docx
csharp.docx
 
C#3.0 & Vb 9.0 New Features
C#3.0 & Vb 9.0 New FeaturesC#3.0 & Vb 9.0 New Features
C#3.0 & Vb 9.0 New Features
 
C# - Igor Ralić
C# - Igor RalićC# - Igor Ralić
C# - Igor Ralić
 
C++ classes tutorials
C++ classes tutorialsC++ classes tutorials
C++ classes tutorials
 
Windows 8 für .net Entwickler
Windows 8 für .net EntwicklerWindows 8 für .net Entwickler
Windows 8 für .net Entwickler
 
Java basics
Java basicsJava basics
Java basics
 
C# 3.0 and LINQ Tech Talk
C# 3.0 and LINQ Tech TalkC# 3.0 and LINQ Tech Talk
C# 3.0 and LINQ Tech Talk
 
New c sharp3_features_(linq)_part_iv
New c sharp3_features_(linq)_part_ivNew c sharp3_features_(linq)_part_iv
New c sharp3_features_(linq)_part_iv
 
Java Script Patterns
Java Script PatternsJava Script Patterns
Java Script Patterns
 
TypeScript: Basic Features and Compilation Guide
TypeScript: Basic Features and Compilation GuideTypeScript: Basic Features and Compilation Guide
TypeScript: Basic Features and Compilation Guide
 
Scala Days NYC 2016
Scala Days NYC 2016Scala Days NYC 2016
Scala Days NYC 2016
 
New c sharp3_features_(linq)_part_iv
New c sharp3_features_(linq)_part_ivNew c sharp3_features_(linq)_part_iv
New c sharp3_features_(linq)_part_iv
 
TypeScript and Angular2 (Love at first sight)
TypeScript and Angular2 (Love at first sight)TypeScript and Angular2 (Love at first sight)
TypeScript and Angular2 (Love at first sight)
 
.NET Attributes and Reflection - What a Developer Needs to Know...
.NET Attributes and Reflection - What a Developer Needs to Know....NET Attributes and Reflection - What a Developer Needs to Know...
.NET Attributes and Reflection - What a Developer Needs to Know...
 
c++ Unit I.pptx
c++ Unit I.pptxc++ Unit I.pptx
c++ Unit I.pptx
 
Functional Programming in JavaScript & ESNext
Functional Programming in JavaScript & ESNextFunctional Programming in JavaScript & ESNext
Functional Programming in JavaScript & ESNext
 
Typescript language extension of java script
Typescript language extension of java scriptTypescript language extension of java script
Typescript language extension of java script
 
NNUG Certification Presentation
NNUG Certification PresentationNNUG Certification Presentation
NNUG Certification Presentation
 

Último

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Último (20)

Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 

TypeScript 101