SlideShare a Scribd company logo
TypeScript: Scaling Up
JavaScript
Saray Chak, Web Developer
Agenda
- What is TypeScript?
- Installation
- Hello World
- Why TypeScript?
- Basic Type
- Function & Class
- Interface
- Generic
- Enum
- Who Use TypeScript?
- Conclusion
- Q&A
- References
What is TypeScript?
JavaScript Superset
Language building up on
JavaScript
Add new features &
advantages to JavaScript
Browser CAN’T execute it!
What is TypeScript?
What is TypeScript?
TypeScript (.ts)
TypeScript Compiler
Javascript (.js)
Installation
The following tools you need to setup to
start with TypeScript:
- Node js
- TypeScript compiler
- IDE (VsCode)
npm install -g typescript
tsc --v
Version 4.0.2
Hello World
compile the app.ts file
You will see the output as
Hello, World!
Why TypeScript?
There are three main reasons to use TypeScript:
- TypeScript adds a strongly-type system to help you avoid many
problems with dynamic types in JavaScript.
- TypeScript always point out the compilation errors at the time of
development.
- TypeScript implements the future features of JavaScript ES Next so
that you can use them today.
-
- Write code better with architecture.
Why TypeScript?
Why TypeScript?
Basic Type
TypeScript inherits the built-in types from JavaScript. TypeScript types is categorized into:
- Primitive type
- Objective Type
Basic Type
Object types:
- Function
- Arrays
- Classes
- Objects
- Tuples
- Enum
Function
TypeScript functions are the building blocks of readable, maintainable, and reusable code.
Function
Function: overloading
Function: overloading
Function: overloading
Overloading function
Class
ES5
Class
ES6
Class
TypeScript
Class: inheritances
Interface
Interface
Interface: extend one interface
Generic
Generic
Using the any type
Generic
TypeScript Generic comes to rescue
Generic: constraints
Generic: constraints
Generic: constraints
Generic: interface
Enum
Without enum With enum
Enum
Who use TypeScript?
Conclusion
- TypeScript simplifies JavaScript code making it easier to
read and understand.
- It gives us all the benefits of ES6, plus more productivity.
- Help us avoid painful bugs by type checking.
- Structural, rather than nominal
Any Questions?
References
- prototype inheritance
- ES6 allowed you to define a class
- https://www.typescripttutorial.net/
- https://www.typescriptlang.org/
- TypeScript type annotations

More Related Content

What's hot

What's hot (20)

Typescript in 30mins
Typescript in 30mins Typescript in 30mins
Typescript in 30mins
 
ReactJS presentation
ReactJS presentationReactJS presentation
ReactJS presentation
 
Angular - Chapter 2 - TypeScript Programming
Angular - Chapter 2 - TypeScript Programming  Angular - Chapter 2 - TypeScript Programming
Angular - Chapter 2 - TypeScript Programming
 
Angular Data Binding
Angular Data BindingAngular Data Binding
Angular Data Binding
 
TypeScript Introduction
TypeScript IntroductionTypeScript Introduction
TypeScript Introduction
 
JavaScript Fetch API
JavaScript Fetch APIJavaScript Fetch API
JavaScript Fetch API
 
TypeScript Best Practices
TypeScript Best PracticesTypeScript Best Practices
TypeScript Best Practices
 
React Native
React NativeReact Native
React Native
 
React JS - A quick introduction tutorial
React JS - A quick introduction tutorialReact JS - A quick introduction tutorial
React JS - A quick introduction tutorial
 
Introduction to react_js
Introduction to react_jsIntroduction to react_js
Introduction to react_js
 
Building blocks of Angular
Building blocks of AngularBuilding blocks of Angular
Building blocks of Angular
 
Angular introduction students
Angular introduction studentsAngular introduction students
Angular introduction students
 
Angular 10 course_content
Angular 10 course_contentAngular 10 course_content
Angular 10 course_content
 
React + Redux Introduction
React + Redux IntroductionReact + Redux Introduction
React + Redux Introduction
 
Its time to React.js
Its time to React.jsIts time to React.js
Its time to React.js
 
TypeScript
TypeScriptTypeScript
TypeScript
 
Reactjs
ReactjsReactjs
Reactjs
 
Angular Basics.pptx
Angular Basics.pptxAngular Basics.pptx
Angular Basics.pptx
 
Angular 14.pptx
Angular 14.pptxAngular 14.pptx
Angular 14.pptx
 
TypeScript Overview
TypeScript OverviewTypeScript Overview
TypeScript Overview
 

Similar to TypeScript

Similar to TypeScript (20)

Migrating Web SDK from JS to TS
Migrating Web SDK from JS to TSMigrating Web SDK from JS to TS
Migrating Web SDK from JS to TS
 
TypeScript Introduction
TypeScript IntroductionTypeScript Introduction
TypeScript Introduction
 
SPUnite17 TypeScript for SharePoint Developers
SPUnite17 TypeScript for SharePoint DevelopersSPUnite17 TypeScript for SharePoint Developers
SPUnite17 TypeScript for SharePoint Developers
 
Type script
Type scriptType script
Type script
 
Type script
Type scriptType script
Type script
 
Introducing asp.net web pages 2
Introducing asp.net web pages 2Introducing asp.net web pages 2
Introducing asp.net web pages 2
 
Build testable react app
Build testable react appBuild testable react app
Build testable react app
 
An Introduction to TypeScript
An Introduction to TypeScriptAn Introduction to TypeScript
An Introduction to TypeScript
 
[DevDay2018] Javascript on the Rise - By Trang Tran, Co-founder & Manager at ...
[DevDay2018] Javascript on the Rise - By Trang Tran, Co-founder & Manager at ...[DevDay2018] Javascript on the Rise - By Trang Tran, Co-founder & Manager at ...
[DevDay2018] Javascript on the Rise - By Trang Tran, Co-founder & Manager at ...
 
Unit 1 - TypeScript & Introduction to Angular CLI.pptx
Unit 1 - TypeScript & Introduction to Angular CLI.pptxUnit 1 - TypeScript & Introduction to Angular CLI.pptx
Unit 1 - TypeScript & Introduction to Angular CLI.pptx
 
Angular, ASP.NET Core, and Visual Studio Code - Oh My!
Angular, ASP.NET Core, and Visual Studio Code - Oh My!Angular, ASP.NET Core, and Visual Studio Code - Oh My!
Angular, ASP.NET Core, and Visual Studio Code - Oh My!
 
Sample Project using design patterns and agile
Sample Project using design patterns and agileSample Project using design patterns and agile
Sample Project using design patterns and agile
 
Type script vs javascript come face to face in battleground
Type script vs javascript come face to face in battlegroundType script vs javascript come face to face in battleground
Type script vs javascript come face to face in battleground
 
Confoo - Javascript Server Side : How to start
Confoo - Javascript Server Side : How to startConfoo - Javascript Server Side : How to start
Confoo - Javascript Server Side : How to start
 
How I learned to stop worrying and love embedding JavaScript
How I learned to stop worrying and love embedding JavaScriptHow I learned to stop worrying and love embedding JavaScript
How I learned to stop worrying and love embedding JavaScript
 
Embedding V8 in Android apps with Ejecta-V8
Embedding V8 in Android apps with Ejecta-V8Embedding V8 in Android apps with Ejecta-V8
Embedding V8 in Android apps with Ejecta-V8
 
TypeScipt - Get Started
TypeScipt - Get StartedTypeScipt - Get Started
TypeScipt - Get Started
 
Testing Angular 2 Applications - Rich Web 2016
Testing Angular 2 Applications - Rich Web 2016Testing Angular 2 Applications - Rich Web 2016
Testing Angular 2 Applications - Rich Web 2016
 
BelTech 2017 - Building Quality in the Browser
BelTech 2017 - Building Quality in the BrowserBelTech 2017 - Building Quality in the Browser
BelTech 2017 - Building Quality in the Browser
 
Typescript - a JS superset
Typescript - a JS supersetTypescript - a JS superset
Typescript - a JS superset
 

Recently uploaded

Recently uploaded (20)

From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
 
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
 
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
 
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
 
What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
 
Salesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
Salesforce Adoption – Metrics, Methods, and Motivation, Antone KomSalesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
Salesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
 
The architecture of Generative AI for enterprises.pdf
The architecture of Generative AI for enterprises.pdfThe architecture of Generative AI for enterprises.pdf
The architecture of Generative AI for enterprises.pdf
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
Optimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through ObservabilityOptimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through Observability
 
In-Depth Performance Testing Guide for IT Professionals
In-Depth Performance Testing Guide for IT ProfessionalsIn-Depth Performance Testing Guide for IT Professionals
In-Depth Performance Testing Guide for IT Professionals
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
10 Differences between Sales Cloud and CPQ, Blanka Doktorová
10 Differences between Sales Cloud and CPQ, Blanka Doktorová10 Differences between Sales Cloud and CPQ, Blanka Doktorová
10 Differences between Sales Cloud and CPQ, Blanka Doktorová
 

TypeScript