SlideShare a Scribd company logo
aOS Aachen
September 3rd 2018
Empower your JavaScript with TypeScript
@felix_billon
aOS Aachen
September 3rd 2018
Félix Billon
Web developper Co-lead Organisateur
@felix_billon
felixbillon
http://shakedatcode.com
Member
aOS Aachen
September 3rd 2018
Raise of TypeScript
aOS Aachen
September 3rd 2018
Raise of TypeScript
• Top 20, RedMonk Programming Language Rankings (June 2018)
• Fourth most loved Programming Language in Stack Overflow 2018 Developer Survey
• TypeScript at Slack (2017)
• Why we chose Typescript (reddit) (2017)
• Typescript is an official language used at Google (April 2017)
• TSConf at Seattle (2018)
• …
aOS Aachen
September 3rd 2018
Integration in IDE
aOS Aachen
September 3rd 2018
TypeScript ?
• Typed superset of Javascript.
• Made in Microsoft.
• Open source on github.
• Main features : transpilation and
static typings.
aOS Aachen
September 3rd 2018
Transpilation
@felix_billon
aOS Aachen
September 3rd 2018
ECMAScript
• ECMAScript is a standard for a scripting languages.
• Well-known implementations of the ECMAScript standard :
javascript, actionscript, …
Browser
JS EngineEcmaScript
implements
Edge : Chakra
Chrome : V8
Firefox : SpiderMonkey
…
aOS Aachen
September 3rd 2018
ECMAScript : historical
ES5
ES6
ES2ES1 ES3
ES4
ES7 ES8
1997 1998 1999 2008 2009 2015 2016 2017
ES9
2018
• Classes
• Arrow function
• Promise
• Destructuring
• Constants
• Modules
• Template Literals
• Map/Set
• Iterators
• Generators
• Symbol type
• …
• Array.prototype.includes
• Exponentation Operator
• Improve regex
• Try/catch
• Format number
• String padding
• Object.value/Object.entries
• Async/await
• Improve trailing comma
• Shared memory and atomics
• Asynchronous Iteration
• Rest/Spread properties
• Improve Regex
• Promise.prototype.finally
• Template Literal Revision
• Strict mode
• Getters/Setters
• ….
aOS Aachen
September 3rd 2018
Implementation rate of ES6 -> Browser
aOS Aachen
September 3rd 2018
Implementation rate of ES6 -> NodeJS
aOS Aachen
September 3rd 2018
Compiling vs Transpiling
Compiling : “Compiling is the general term for taking source code
written in one language and transforming into another”
Transpiling : “Transpiling is a specific term for taking source code
written in one language and transforming into another language that
has a similar level of abstraction”
aOS Aachen
September 3rd 2018
Transpilation : exemple
aOS Aachen
September 3rd 2018
Static typings
@felix_billon
aOS Aachen
September 3rd 2018
What's the purpose
• Spottings common error.
• Improve readbility of code.
• Enhance IDE features : code navigation, autocompletion, refactoring,
…
aOS Aachen
September 3rd 2018
Basic (1/2)
• Basic Types : boolean, number, string, array, object, void …
• Example :
function foo(bar: string): void { ... }
let list: number[] = [1,2,3];
aOS Aachen
September 3rd 2018
Basic (2/2)
• Type inference : typescript’s compiler can infer types.
• Be careful with special type that is not type safe : any
• Typings are used only during compilation.
aOS Aachen
September 3rd 2018
TypeScript Definition File
• File wich have .d.ts extention, describe and type javascript code.
• Use external NPM’s package in my TypeScript Project :
1. Write in TS -> nothing to do
2. Write in JS but it shipped with its .d.ts -> nothing to do
3. Write in JS without its .d.ts -> fetch it on NPM @types (to search TypeSearch)
aOS Aachen
September 3rd 2018
Tips 1 : option strict
• Improve type checking.
• Master option that activate sub-options :
• noImplicitAny
• noImplicitThis
• alwaysStrict
• strictNullChecks
• strictFunctionTypes
• strictPropertyInitialization
• Use it directly on new project and incrementally on legacy project.
aOS Aachen
September 3rd 2018
Tips 2 : Nominal typings
• TypeScript use structural typings also called duck typings.
• Several technic exist to force nominal typings
aOS Aachen
September 3rd 2018
Tips 3 : Architecture
aOS Aachen
September 3rd 2018
Conclusion
@felix_billon
aOS Aachen
September 3rd 2018
Conclusion
• Brings more robustness and scalability on your codebase.
• Smooth learning curve and well integrated in front-end environment.
• Big active community.
aOS Aachen
September 3rd 2018
Usefull link
ESNext :
• Free Ebook :
http://exploringjs.com/es6.html et
http://exploringjs.com/es2016-
es2017/index.html
• Free Ebook :
https://leanpub.com/understandin
ges6/read
Typescript :
• Official website :
www.typescriptlang.org
• Free Ebook :
https://github.com/basarat/type
script-book
aOS Aachen
September 3rd 2018
Thanks to our sponsors!
Platinum
Organizer
Diamond

More Related Content

PPTX
Type Annotations in Python: Whats, Whys and Wows!
PDF
OpenAPIを利用したPythonWebアプリケーション開発
PPTX
TypeScript
PDF
Pythonistaで始めるiOSプロトタイプ開発
PPTX
From .NET Core 3, all the rest will be legacy
PDF
My 10 favorite haxe language features in 30 mins
PPTX
Machine Learning Standards
PDF
Elixir + GraphQL = Absinthe 2019.04.10
Type Annotations in Python: Whats, Whys and Wows!
OpenAPIを利用したPythonWebアプリケーション開発
TypeScript
Pythonistaで始めるiOSプロトタイプ開発
From .NET Core 3, all the rest will be legacy
My 10 favorite haxe language features in 30 mins
Machine Learning Standards
Elixir + GraphQL = Absinthe 2019.04.10

Similar to 2018 09-03 aOS Aachen - Empower your javascript with typescript - Felix Billon (20)

PPTX
Enhance your Javascript with Typescript - Félix Billon
PDF
Typescript for the programmers who like javascript
PPT
phases of compiler PPT includes phases of compiler
PPTX
TypeScript: Basic Features and Compilation Guide
PPTX
Compiler design
PDF
Enjoy Type Hints and its benefits
PDF
Mini-Training: TypeScript
PPTX
Benefits of Typescript.pptx
PPTX
Unit 1 - TypeScript & Introduction to Angular CLI.pptx
PPTX
TypeScript and Angular2 (Love at first sight)
PPTX
Improving your team's source code searching capabilities - Voxxed Thessalonik...
PPTX
Improving your team’s source code searching capabilities
PDF
One language to rule them all type script
PPTX
Presentation on python
PPT
TypeScript for Alfresco and CMIS - Alfresco DevCon 2012 San Jose
PDF
TypeScript 101 - We RISE Tech Conference
PPTX
P1 2018 python
PPTX
Introduction to TypeScript
PDF
ITCamp 2019 - Andrea Saltarello - Implementing bots and Alexa skills using Az...
PDF
Type script
Enhance your Javascript with Typescript - Félix Billon
Typescript for the programmers who like javascript
phases of compiler PPT includes phases of compiler
TypeScript: Basic Features and Compilation Guide
Compiler design
Enjoy Type Hints and its benefits
Mini-Training: TypeScript
Benefits of Typescript.pptx
Unit 1 - TypeScript & Introduction to Angular CLI.pptx
TypeScript and Angular2 (Love at first sight)
Improving your team's source code searching capabilities - Voxxed Thessalonik...
Improving your team’s source code searching capabilities
One language to rule them all type script
Presentation on python
TypeScript for Alfresco and CMIS - Alfresco DevCon 2012 San Jose
TypeScript 101 - We RISE Tech Conference
P1 2018 python
Introduction to TypeScript
ITCamp 2019 - Andrea Saltarello - Implementing bots and Alexa skills using Az...
Type script
Ad

More from aOS Community (20)

PPTX
Commencer le IaaS sur Azure - aOS Tahiti 03-03-2020
PPTX
Migrer vers O365. Quelles stragtégies? - aOS Tahiti 03-03-2020
PPTX
Passer des macro Excel à la power plateform - aOS Tahiti 03-03-2020
PDF
Serverless avec azure functions - aOS Tahiti 03-03-2020
PPTX
Passer des macro Excel à la power plateform - aOS Nouméa 28-02-2020
PDF
MS ignite : les nouveautés autour des content services et projet cortex - aOS...
PDF
Cybersecurité dans M365 - aOS Noumea 28-02-2020
PDF
Introduction a Power Automate - aOS Nouméa 28-02-2020
PDF
aOS Monaco 2019 - S3 - Présentation Varonis - Cloud Data Protection - Benjami...
PDF
aOS Monaco 2019 - S2 - Présentation ARKADIN - TEAMS Adoption - Laurent Pilo
PDF
aOS Monaco 2019 - C1 - Sécuriser sa messagerie sur Office 365 - Hakim Taoussi...
PDF
aOS Monaco 2019 - B7 - I Developed a SPFx solution, what to do next and how t...
PDF
aOS Monaco 2019 - B6 - Mister Governance and Doctor Teams - Jean-François Ber...
PDF
aOS Monaco 2019 - B5 - The good, the bad and the unexpected - a BOT story - K...
PDF
aOS Monaco 2019 - B4 - Three must have workflows with Microsoft Flow - Vlad C...
PDF
aOS Monaco 2019 - B3 - Create purchase request in PowerApps - Robi Voncina
PDF
aOS Monaco 2019 - B2 - Intégrer la Power Platform avec SharePoint - Patrick G...
PDF
aOS Monaco 2019 - B1 - Construire son infrastructure sur Azure un jeu d'enfan...
PDF
aOS Monaco 2019 - A7 - Sécurisez votre SI et vos services Office 365 partie 2...
PDF
aOS Monaco 2019 - A6 - Sécurisez votre SI et vos services Office 365 partie 1...
Commencer le IaaS sur Azure - aOS Tahiti 03-03-2020
Migrer vers O365. Quelles stragtégies? - aOS Tahiti 03-03-2020
Passer des macro Excel à la power plateform - aOS Tahiti 03-03-2020
Serverless avec azure functions - aOS Tahiti 03-03-2020
Passer des macro Excel à la power plateform - aOS Nouméa 28-02-2020
MS ignite : les nouveautés autour des content services et projet cortex - aOS...
Cybersecurité dans M365 - aOS Noumea 28-02-2020
Introduction a Power Automate - aOS Nouméa 28-02-2020
aOS Monaco 2019 - S3 - Présentation Varonis - Cloud Data Protection - Benjami...
aOS Monaco 2019 - S2 - Présentation ARKADIN - TEAMS Adoption - Laurent Pilo
aOS Monaco 2019 - C1 - Sécuriser sa messagerie sur Office 365 - Hakim Taoussi...
aOS Monaco 2019 - B7 - I Developed a SPFx solution, what to do next and how t...
aOS Monaco 2019 - B6 - Mister Governance and Doctor Teams - Jean-François Ber...
aOS Monaco 2019 - B5 - The good, the bad and the unexpected - a BOT story - K...
aOS Monaco 2019 - B4 - Three must have workflows with Microsoft Flow - Vlad C...
aOS Monaco 2019 - B3 - Create purchase request in PowerApps - Robi Voncina
aOS Monaco 2019 - B2 - Intégrer la Power Platform avec SharePoint - Patrick G...
aOS Monaco 2019 - B1 - Construire son infrastructure sur Azure un jeu d'enfan...
aOS Monaco 2019 - A7 - Sécurisez votre SI et vos services Office 365 partie 2...
aOS Monaco 2019 - A6 - Sécurisez votre SI et vos services Office 365 partie 1...
Ad

Recently uploaded (20)

PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PPTX
Cloud computing and distributed systems.
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PPTX
Spectroscopy.pptx food analysis technology
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
NewMind AI Weekly Chronicles - August'25-Week II
PPTX
sap open course for s4hana steps from ECC to s4
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PPTX
MYSQL Presentation for SQL database connectivity
PDF
A comparative analysis of optical character recognition models for extracting...
PPT
Teaching material agriculture food technology
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Encapsulation_ Review paper, used for researhc scholars
20250228 LYD VKU AI Blended-Learning.pptx
Cloud computing and distributed systems.
Review of recent advances in non-invasive hemoglobin estimation
Reach Out and Touch Someone: Haptics and Empathic Computing
Spectroscopy.pptx food analysis technology
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Programs and apps: productivity, graphics, security and other tools
NewMind AI Weekly Chronicles - August'25-Week II
sap open course for s4hana steps from ECC to s4
Spectral efficient network and resource selection model in 5G networks
Diabetes mellitus diagnosis method based random forest with bat algorithm
The AUB Centre for AI in Media Proposal.docx
Assigned Numbers - 2025 - Bluetooth® Document
MYSQL Presentation for SQL database connectivity
A comparative analysis of optical character recognition models for extracting...
Teaching material agriculture food technology
Per capita expenditure prediction using model stacking based on satellite ima...
Chapter 3 Spatial Domain Image Processing.pdf
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Encapsulation_ Review paper, used for researhc scholars

2018 09-03 aOS Aachen - Empower your javascript with typescript - Felix Billon

  • 1. aOS Aachen September 3rd 2018 Empower your JavaScript with TypeScript @felix_billon
  • 2. aOS Aachen September 3rd 2018 Félix Billon Web developper Co-lead Organisateur @felix_billon felixbillon http://shakedatcode.com Member
  • 3. aOS Aachen September 3rd 2018 Raise of TypeScript
  • 4. aOS Aachen September 3rd 2018 Raise of TypeScript • Top 20, RedMonk Programming Language Rankings (June 2018) • Fourth most loved Programming Language in Stack Overflow 2018 Developer Survey • TypeScript at Slack (2017) • Why we chose Typescript (reddit) (2017) • Typescript is an official language used at Google (April 2017) • TSConf at Seattle (2018) • …
  • 5. aOS Aachen September 3rd 2018 Integration in IDE
  • 6. aOS Aachen September 3rd 2018 TypeScript ? • Typed superset of Javascript. • Made in Microsoft. • Open source on github. • Main features : transpilation and static typings.
  • 7. aOS Aachen September 3rd 2018 Transpilation @felix_billon
  • 8. aOS Aachen September 3rd 2018 ECMAScript • ECMAScript is a standard for a scripting languages. • Well-known implementations of the ECMAScript standard : javascript, actionscript, … Browser JS EngineEcmaScript implements Edge : Chakra Chrome : V8 Firefox : SpiderMonkey …
  • 9. aOS Aachen September 3rd 2018 ECMAScript : historical ES5 ES6 ES2ES1 ES3 ES4 ES7 ES8 1997 1998 1999 2008 2009 2015 2016 2017 ES9 2018 • Classes • Arrow function • Promise • Destructuring • Constants • Modules • Template Literals • Map/Set • Iterators • Generators • Symbol type • … • Array.prototype.includes • Exponentation Operator • Improve regex • Try/catch • Format number • String padding • Object.value/Object.entries • Async/await • Improve trailing comma • Shared memory and atomics • Asynchronous Iteration • Rest/Spread properties • Improve Regex • Promise.prototype.finally • Template Literal Revision • Strict mode • Getters/Setters • ….
  • 10. aOS Aachen September 3rd 2018 Implementation rate of ES6 -> Browser
  • 11. aOS Aachen September 3rd 2018 Implementation rate of ES6 -> NodeJS
  • 12. aOS Aachen September 3rd 2018 Compiling vs Transpiling Compiling : “Compiling is the general term for taking source code written in one language and transforming into another” Transpiling : “Transpiling is a specific term for taking source code written in one language and transforming into another language that has a similar level of abstraction”
  • 13. aOS Aachen September 3rd 2018 Transpilation : exemple
  • 14. aOS Aachen September 3rd 2018 Static typings @felix_billon
  • 15. aOS Aachen September 3rd 2018 What's the purpose • Spottings common error. • Improve readbility of code. • Enhance IDE features : code navigation, autocompletion, refactoring, …
  • 16. aOS Aachen September 3rd 2018 Basic (1/2) • Basic Types : boolean, number, string, array, object, void … • Example : function foo(bar: string): void { ... } let list: number[] = [1,2,3];
  • 17. aOS Aachen September 3rd 2018 Basic (2/2) • Type inference : typescript’s compiler can infer types. • Be careful with special type that is not type safe : any • Typings are used only during compilation.
  • 18. aOS Aachen September 3rd 2018 TypeScript Definition File • File wich have .d.ts extention, describe and type javascript code. • Use external NPM’s package in my TypeScript Project : 1. Write in TS -> nothing to do 2. Write in JS but it shipped with its .d.ts -> nothing to do 3. Write in JS without its .d.ts -> fetch it on NPM @types (to search TypeSearch)
  • 19. aOS Aachen September 3rd 2018 Tips 1 : option strict • Improve type checking. • Master option that activate sub-options : • noImplicitAny • noImplicitThis • alwaysStrict • strictNullChecks • strictFunctionTypes • strictPropertyInitialization • Use it directly on new project and incrementally on legacy project.
  • 20. aOS Aachen September 3rd 2018 Tips 2 : Nominal typings • TypeScript use structural typings also called duck typings. • Several technic exist to force nominal typings
  • 21. aOS Aachen September 3rd 2018 Tips 3 : Architecture
  • 22. aOS Aachen September 3rd 2018 Conclusion @felix_billon
  • 23. aOS Aachen September 3rd 2018 Conclusion • Brings more robustness and scalability on your codebase. • Smooth learning curve and well integrated in front-end environment. • Big active community.
  • 24. aOS Aachen September 3rd 2018 Usefull link ESNext : • Free Ebook : http://exploringjs.com/es6.html et http://exploringjs.com/es2016- es2017/index.html • Free Ebook : https://leanpub.com/understandin ges6/read Typescript : • Official website : www.typescriptlang.org • Free Ebook : https://github.com/basarat/type script-book
  • 25. aOS Aachen September 3rd 2018 Thanks to our sponsors! Platinum Organizer Diamond