SlideShare ist ein Scribd-Unternehmen logo
1 von 27
TypeScript
Nitay Neeman
https://goo.gl/jj5K7x
We will talk about
○ What is TypeScript?
○ Motivation
○ Brief history
○ Main features
○ Conclusions
2
What is TypeScript?
“TypeScript is a free and open source programming
language developed and maintained by Microsoft.
It is a strict superset of JavaScript, and adds optional
static typing and class-based object-oriented
programming to the language.” (Definition by Wiki)
TypeScript transpiles to pure JavaScript.
3
The meaning of transpiling
Compilation - taking source code written in one
language and transforming into another.
For example: C# -> IL.
Transpilation - taking source code written in one
language and transforming into another language
that has a similar level of abstraction.
For example: C++ -> C, Sass / LESS -> CSS.
4
Motivation
○ Syntax checking
○ Code completion
○ Type annotations
○ ES6 support
○ Help us preparing for AngularJS 2.0
5
Brief history
○ 2010 - Microsoft started internal development.
○ 2012 - First release (0.8) of TypeScript.
It was supported in Visual Studio only.
○ 2013 - Next release (0.9) for supporting other IDE’s.
○ 2014 - TypeScript 1.0 was released.
Meanwhile, AtScript was announced by Google.
○ 2015 - Microsoft and Google announced that AtScript
development was abandoned and that features of
AtScript would be implemented in TypeScript. 6
The reaction of Microsoft about AtScript..
7
TypeScript and ECMAScript 6
8
So.. TypeScript includes:
○ Classes
○ Modules
○ Arrow functions
○ Default, optional and rest parameters
And all the awesome features of ES6!
9
New basic types
○ Boolean
○ Number (float)
○ String
○ Array (one type)
○ Enum
○ Any - general type
○ Void - empty type
10
Syntax checking
The following command:
Transpilation output:
11
Interfaces
Interfaces define rules on following types:
○ Objects
○ Functions
○ Arrays
○ Classes
12
Interfaces - Objects
13
Interfaces - Functions
14
Interfaces - Classes
15
Generics
General types for reusability.
16
Generics - Classes
17
Generics - Constraints
18
Mixins
Build a class by partial classes.
19
Declaration Merging
Merging of:
○ Multiple interfaces
○ Multiple modules
○ Modules with:
○ Classes
○ Functions
○ Enums
20
Declaration Merging - Interfaces
The following are equal:
21
Declaration Merging - Modules
In similar way, the following are equal:
22
Declaration Merging - Modules & Classes
Exporting of module members into a class:
23
Declaration Merging - Modules & Enums / Functions
In the same way,
24
Module
- Members
Enum
Enum object with static
members
Function
Function object with
static members
Declaration file (.d.ts)
Without this file - TypeScript transpiler will not
recognize the code of external JavaScript library.
Actually, it guides the transpiler how to structure the
code and it provides the desired “type annotation”.
Download or build your own.
25
Resources
○ TypeScript Definition
○ Compiling vs Transpiling
○ AtScript History
○ Declaration file
○ TypeScript Handbook
○ TypeScript Playground
26
Questions
27
?

Weitere ähnliche Inhalte

Was ist angesagt? (6)

TEI ODD support in oXygen
TEI ODD support in oXygenTEI ODD support in oXygen
TEI ODD support in oXygen
 
A hierarchical neural autoencoder for paragraphs and documents
A hierarchical neural autoencoder for paragraphs and documentsA hierarchical neural autoencoder for paragraphs and documents
A hierarchical neural autoencoder for paragraphs and documents
 
Javantura v3 - RIT Croatia
Javantura v3 - RIT CroatiaJavantura v3 - RIT Croatia
Javantura v3 - RIT Croatia
 
Log stage zero-cost structured logging
Log stage  zero-cost structured loggingLog stage  zero-cost structured logging
Log stage zero-cost structured logging
 
Build web server
Build web serverBuild web server
Build web server
 
FluentDom
FluentDomFluentDom
FluentDom
 

Andere mochten auch

Typescript: enjoying large scale browser development
Typescript: enjoying large scale browser developmentTypescript: enjoying large scale browser development
Typescript: enjoying large scale browser developmentJoost de Vries
 
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 javascriptAndrei Sebastian Cîmpean
 
Angular 2.0: Getting ready
Angular 2.0: Getting readyAngular 2.0: Getting ready
Angular 2.0: Getting readyAxilis
 
Double page spread stages powerpoint
Double page spread stages powerpointDouble page spread stages powerpoint
Double page spread stages powerpointkittylantos
 
Getting started with ES6
Getting started with ES6Getting started with ES6
Getting started with ES6Nitay Neeman
 
What is New in HTML5?
What is New in HTML5?What is New in HTML5?
What is New in HTML5?Nitay Neeman
 
тема методической работы в 2014
тема методической работы в 2014тема методической работы в 2014
тема методической работы в 2014bukish
 
Feeding Crowds & Turning Heads
Feeding Crowds & Turning HeadsFeeding Crowds & Turning Heads
Feeding Crowds & Turning HeadsCrossPointBible
 
Difficult Pathways Of A Disciple
Difficult Pathways Of A DiscipleDifficult Pathways Of A Disciple
Difficult Pathways Of A DiscipleCrossPointBible
 
Mythes et réalités : Grands témoins
Mythes et réalités : Grands témoinsMythes et réalités : Grands témoins
Mythes et réalités : Grands témoinsFFFOD
 
Annual Report 2012-2013
Annual Report 2012-2013Annual Report 2012-2013
Annual Report 2012-2013Karolyn Gaston
 
Dicey financial chronicle - 13th april, 2013
Dicey   financial chronicle - 13th april, 2013Dicey   financial chronicle - 13th april, 2013
Dicey financial chronicle - 13th april, 2013Jagannadham Thunuguntla
 
Building Angular 2.0 applications with TypeScript
Building Angular 2.0 applications with TypeScriptBuilding Angular 2.0 applications with TypeScript
Building Angular 2.0 applications with TypeScriptMSDEVMTL
 
Typescript - a JS superset
Typescript - a JS supersetTypescript - a JS superset
Typescript - a JS supersetTyrone Allen
 
Getting Started with TypeScript
Getting Started with TypeScriptGetting Started with TypeScript
Getting Started with TypeScriptGil Fink
 
Typescript in 30mins
Typescript in 30mins Typescript in 30mins
Typescript in 30mins Udaya Kumar
 

Andere mochten auch (20)

TypeScript DevSum 2013
TypeScript DevSum 2013TypeScript DevSum 2013
TypeScript DevSum 2013
 
Typescript: enjoying large scale browser development
Typescript: enjoying large scale browser developmentTypescript: enjoying large scale browser development
Typescript: enjoying large scale browser development
 
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
 
Angular 2.0: Getting ready
Angular 2.0: Getting readyAngular 2.0: Getting ready
Angular 2.0: Getting ready
 
TypeScript
TypeScriptTypeScript
TypeScript
 
Double page spread stages powerpoint
Double page spread stages powerpointDouble page spread stages powerpoint
Double page spread stages powerpoint
 
Getting started with ES6
Getting started with ES6Getting started with ES6
Getting started with ES6
 
What is New in HTML5?
What is New in HTML5?What is New in HTML5?
What is New in HTML5?
 
Estimate Sheet
Estimate SheetEstimate Sheet
Estimate Sheet
 
тема методической работы в 2014
тема методической работы в 2014тема методической работы в 2014
тема методической работы в 2014
 
A Troubled Heart
A Troubled HeartA Troubled Heart
A Troubled Heart
 
Feeding Crowds & Turning Heads
Feeding Crowds & Turning HeadsFeeding Crowds & Turning Heads
Feeding Crowds & Turning Heads
 
Difficult Pathways Of A Disciple
Difficult Pathways Of A DiscipleDifficult Pathways Of A Disciple
Difficult Pathways Of A Disciple
 
Mythes et réalités : Grands témoins
Mythes et réalités : Grands témoinsMythes et réalités : Grands témoins
Mythes et réalités : Grands témoins
 
Annual Report 2012-2013
Annual Report 2012-2013Annual Report 2012-2013
Annual Report 2012-2013
 
Dicey financial chronicle - 13th april, 2013
Dicey   financial chronicle - 13th april, 2013Dicey   financial chronicle - 13th april, 2013
Dicey financial chronicle - 13th april, 2013
 
Building Angular 2.0 applications with TypeScript
Building Angular 2.0 applications with TypeScriptBuilding Angular 2.0 applications with TypeScript
Building Angular 2.0 applications with TypeScript
 
Typescript - a JS superset
Typescript - a JS supersetTypescript - a JS superset
Typescript - a JS superset
 
Getting Started with TypeScript
Getting Started with TypeScriptGetting Started with TypeScript
Getting Started with TypeScript
 
Typescript in 30mins
Typescript in 30mins Typescript in 30mins
Typescript in 30mins
 

Ähnlich wie Why do we need TypeScript?

Benefits of Typescript.pptx
Benefits of Typescript.pptxBenefits of Typescript.pptx
Benefits of Typescript.pptxAmitGupta440280
 
Blueprints: Introduction to Python programming
Blueprints: Introduction to Python programmingBlueprints: Introduction to Python programming
Blueprints: Introduction to Python programmingBhalaji Nagarajan
 
Power Leveling your TypeScript
Power Leveling your TypeScriptPower Leveling your TypeScript
Power Leveling your TypeScriptOffirmo
 
Ln monitoring repositories
Ln monitoring repositoriesLn monitoring repositories
Ln monitoring repositoriessnyff
 
Getting Started with the TypeScript Language
Getting Started with the TypeScript LanguageGetting Started with the TypeScript Language
Getting Started with the TypeScript LanguageGil Fink
 
Typescript language extension of java script
Typescript language extension of java scriptTypescript language extension of java script
Typescript language extension of java scriptmichaelaaron25322
 
Substrait Overview.pdf
Substrait Overview.pdfSubstrait Overview.pdf
Substrait Overview.pdfRinat Abdullin
 
Machine Learning in News Media: Case study 24sata.hr - Marko Velic, Enes Deumic
Machine Learning in News Media: Case study 24sata.hr - Marko Velic, Enes DeumicMachine Learning in News Media: Case study 24sata.hr - Marko Velic, Enes Deumic
Machine Learning in News Media: Case study 24sata.hr - Marko Velic, Enes DeumicInstitute of Contemporary Sciences
 
Stefan Richter - Writing simple, readable and robust code: Examples in Java, ...
Stefan Richter - Writing simple, readable and robust code: Examples in Java, ...Stefan Richter - Writing simple, readable and robust code: Examples in Java, ...
Stefan Richter - Writing simple, readable and robust code: Examples in Java, ...AboutYouGmbH
 
.Net overview|Introduction Of .net
.Net overview|Introduction Of .net.Net overview|Introduction Of .net
.Net overview|Introduction Of .netpinky singh
 
BUD17-302: LLVM Internals #2
BUD17-302: LLVM Internals #2 BUD17-302: LLVM Internals #2
BUD17-302: LLVM Internals #2 Linaro
 
Chapter-1 C#.pptx
Chapter-1 C#.pptxChapter-1 C#.pptx
Chapter-1 C#.pptxfaarax4
 

Ähnlich wie Why do we need TypeScript? (20)

Type script
Type scriptType script
Type script
 
Type script
Type scriptType script
Type script
 
Benefits of Typescript.pptx
Benefits of Typescript.pptxBenefits of Typescript.pptx
Benefits of Typescript.pptx
 
Blueprints: Introduction to Python programming
Blueprints: Introduction to Python programmingBlueprints: Introduction to Python programming
Blueprints: Introduction to Python programming
 
Power Leveling your TypeScript
Power Leveling your TypeScriptPower Leveling your TypeScript
Power Leveling your TypeScript
 
Ln monitoring repositories
Ln monitoring repositoriesLn monitoring repositories
Ln monitoring repositories
 
Getting Started with the TypeScript Language
Getting Started with the TypeScript LanguageGetting Started with the TypeScript Language
Getting Started with the TypeScript Language
 
Typescript language extension of java script
Typescript language extension of java scriptTypescript language extension of java script
Typescript language extension of java script
 
Substrait Overview.pdf
Substrait Overview.pdfSubstrait Overview.pdf
Substrait Overview.pdf
 
Machine Learning in News Media: Case study 24sata.hr - Marko Velic, Enes Deumic
Machine Learning in News Media: Case study 24sata.hr - Marko Velic, Enes DeumicMachine Learning in News Media: Case study 24sata.hr - Marko Velic, Enes Deumic
Machine Learning in News Media: Case study 24sata.hr - Marko Velic, Enes Deumic
 
C# Unit 1 notes
C# Unit 1 notesC# Unit 1 notes
C# Unit 1 notes
 
Stefan Richter - Writing simple, readable and robust code: Examples in Java, ...
Stefan Richter - Writing simple, readable and robust code: Examples in Java, ...Stefan Richter - Writing simple, readable and robust code: Examples in Java, ...
Stefan Richter - Writing simple, readable and robust code: Examples in Java, ...
 
.Net overview|Introduction Of .net
.Net overview|Introduction Of .net.Net overview|Introduction Of .net
.Net overview|Introduction Of .net
 
04-JS.pptx
04-JS.pptx04-JS.pptx
04-JS.pptx
 
04-JS.pptx
04-JS.pptx04-JS.pptx
04-JS.pptx
 
04-JS.pptx
04-JS.pptx04-JS.pptx
04-JS.pptx
 
Ruxmon.2013-08.-.CodeBro!
Ruxmon.2013-08.-.CodeBro!Ruxmon.2013-08.-.CodeBro!
Ruxmon.2013-08.-.CodeBro!
 
BUD17-302: LLVM Internals #2
BUD17-302: LLVM Internals #2 BUD17-302: LLVM Internals #2
BUD17-302: LLVM Internals #2
 
Chapter-1 C#.pptx
Chapter-1 C#.pptxChapter-1 C#.pptx
Chapter-1 C#.pptx
 
Introduction to JavaScript
Introduction to JavaScriptIntroduction to JavaScript
Introduction to JavaScript
 

Kürzlich hochgeladen

CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGSujit Pal
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 

Kürzlich hochgeladen (20)

CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 

Why do we need TypeScript?