SlideShare a Scribd company logo
1 of 26
Neal Creative | click & Learn more
Neal Creative ©
TIP │ Use the built-in color
palette with green and yellow
for callouts and accents
2
TypeScript
@Nikhil_Thomas
Javascript
Typescript
4
Javascript
Abstraction is a
process where
you show only
“relevant” data
and “hide”
unnecessary
details from the
user
Encapsulation is
the process of
combining data
and functions
into a single unit
Modularity is
the act of
partitioning a
program into
single units
Polymorphism
is the ability of a
message or data
to be processed
in more than one
form
Inheritance is the
capability of one
class to inherit
properties from
another class
Basic Characteristics of Object Oriented Programming
1 2 3 4 5
6
JavaScript Objects
OBJECT
Property 1 Property 2
Property 3 Property 4
Property 5 Property 6
7
TYPESCRIPT:THE FUTURE
JAVASCRIPTTECHNOLOGIES KEEPS
CHANGES
LEARN USE
CREATE
MOVE WITH TECHNOLOGY
1
2 VARIABLES
TYPES
OPERATORS
FUNCTIONS
INTERFACE
CLASSES
VARIABLES
• Variables is a container to hold data and is done by var
keyword or let keyword.
• If we skip keyword to declare a variable we get an error
message as “cannot find name”.
Example:
Let vs Var Keyword
• The scope of a variable defined with var is global scope or
declared outside any function.
• The scope of a variable defined with let is block scope.
Example:-
12
TYPES
• Type is a classification of data which tells the compiler or
interpreter how the programmer intends to use the
data(example : number, string).
• TypeScript is a strongly typed language and JavaScript is
a weakly typed language.
• TypeScript has a small number of build-in types,
including,
1. Number
2. String
3. Boolean
4. Array
5. Enum
6. Void & Any
Number & String Types
• The number type can be any set of any numbers
• The string type can be any string-i.e,any sequence of
Unicode characters encloses within a single or double
quotes
• You can also use template strings, which can span multiple
lines and have embedded expressions. These strings are
surrounded by the backtick/backquote (`) character, and
embedded expressions are of the form ${ expr }.
Boolean Types
• Booleans have only two valid value true/false
• Before version 0.9 of typeScript, the Boolean type was
described using bool keyword. There was a breaking
change in the 0.9 TypeScript language specifications,
which changed the keyword to boolean
Enum
• Enums allow us to define a set of named numeric constants.
• An enum can be defined using the enum keyword
Array Types
• Array types define both that a variable is an array and the
kind of elements it contain.
• Syntax:-
1. var [identifier]:type=[];
2. var [identifier]:Array<type>=[];
• Example:-
Any& Void types
• The any data type is the super type of all types in
TypeScript. It denotes a dynamic type.if we don’t know a
particular type we can choose any type
• void is a little like the opposite of any: the absence of
having any type at all. You may commonly see this as the
return type of functions that do not return a value
19
Operators
• Operators are user for some operations on data.
• All the standard JavaScript operators are available in
TypeScript and they are,
1. Increment and Decrement Operator (“++“, “--“)
2. Binary Operator (“+“, “-“, “/“, “*“, “%“)
3. Bitwise Operator("~" , "&”, "|", "^" ,"<<" ,">>“)
4. Comparison Operators (“==" , “!=“ , “>", “<" ,"<=“, ”>=”)
5. Logical Operator (“&&“, “||“, ”!”)
6. Conditional Operator(“?:“)
20
Functions
• Function is a block of code designed to perform a
particular task.
• Similar to JavaScript function.
• Several optional features:types,optional
parameters,default parameters.
• A parameter is a variable in a method definition. When a
method is called, the arguments are the data you pass
into the method's parameters.
Example:-
21
Optional Parameters
• Parameters are required by default in TypeScript and we
are creating an optional parameters with a question
mark(?).
• Example:-
22
Default Parameters
• In Default parameters we are simply assigning some text
as default value.when ever we omitted the argument
default value is taken.
Example:-
23
Class
• Class is a way to bind data's and functions relating to any
entity together.
• Classes are defined with the class keyword and instantiated
with the new keyword.
• The syntax should look familiar if you’ve used C# or Java
before.
24
Inheritance
• Classes can inherit properties from other classes
• A class inherits from another class using the extends
keyword.
• Child class inherits all methods and properties
Example:-
25
Access Modifiers
• Typescript supports the common access modifiers that
control class members access.
• Typescript access modifiers are :
1. public : available on instances everywhere
2. private : not available for access outside the class.
3. protected : available on child classes but not on
instances directly.
Typescript

More Related Content

What's hot

TypeScript: Basic Features and Compilation Guide
TypeScript: Basic Features and Compilation GuideTypeScript: Basic Features and Compilation Guide
TypeScript: Basic Features and Compilation GuideNascenia IT
 
Getting Started with TypeScript
Getting Started with TypeScriptGetting Started with TypeScript
Getting Started with TypeScriptGil Fink
 
TypeScript: coding JavaScript without the pain
TypeScript: coding JavaScript without the painTypeScript: coding JavaScript without the pain
TypeScript: coding JavaScript without the painSander Mak (@Sander_Mak)
 
Typescript Fundamentals
Typescript FundamentalsTypescript Fundamentals
Typescript FundamentalsSunny Sharma
 
Introduction to TypeScript by Winston Levi
Introduction to TypeScript by Winston LeviIntroduction to TypeScript by Winston Levi
Introduction to TypeScript by Winston LeviWinston Levi
 
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
 
TypeScript Modules
TypeScript ModulesTypeScript Modules
TypeScript ModulesNoam Kfir
 
Power Leveling your TypeScript
Power Leveling your TypeScriptPower Leveling your TypeScript
Power Leveling your TypeScriptOffirmo
 
Introducing type script
Introducing type scriptIntroducing type script
Introducing type scriptRemo Jansen
 
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
 

What's hot (20)

Learning typescript
Learning typescriptLearning typescript
Learning typescript
 
TypeScript: Basic Features and Compilation Guide
TypeScript: Basic Features and Compilation GuideTypeScript: Basic Features and Compilation Guide
TypeScript: Basic Features and Compilation Guide
 
Getting Started with TypeScript
Getting Started with TypeScriptGetting Started with TypeScript
Getting Started with TypeScript
 
TypeScript
TypeScriptTypeScript
TypeScript
 
TypeScript: coding JavaScript without the pain
TypeScript: coding JavaScript without the painTypeScript: coding JavaScript without the pain
TypeScript: coding JavaScript without the pain
 
Typescript Fundamentals
Typescript FundamentalsTypescript Fundamentals
Typescript Fundamentals
 
Introducing TypeScript
Introducing TypeScriptIntroducing TypeScript
Introducing TypeScript
 
Introduction to TypeScript by Winston Levi
Introduction to TypeScript by Winston LeviIntroduction to TypeScript by Winston Levi
Introduction to TypeScript by Winston Levi
 
Typescript ppt
Typescript pptTypescript ppt
Typescript ppt
 
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
 
Getting started with typescript
Getting started with typescriptGetting started with typescript
Getting started with typescript
 
TypeScript Modules
TypeScript ModulesTypeScript Modules
TypeScript Modules
 
TypeScript intro
TypeScript introTypeScript intro
TypeScript intro
 
Power Leveling your TypeScript
Power Leveling your TypeScriptPower Leveling your TypeScript
Power Leveling your TypeScript
 
TypeScript 101
TypeScript 101TypeScript 101
TypeScript 101
 
AngularConf2015
AngularConf2015AngularConf2015
AngularConf2015
 
Introducing type script
Introducing type scriptIntroducing type script
Introducing type script
 
TypeScript Overview
TypeScript OverviewTypeScript Overview
TypeScript Overview
 
Typescript: enjoying large scale browser development
Typescript: enjoying large scale browser developmentTypescript: enjoying large scale browser development
Typescript: enjoying large scale browser development
 
Introduction to JavaScript Programming
Introduction to JavaScript ProgrammingIntroduction to JavaScript Programming
Introduction to JavaScript Programming
 

Viewers also liked

Angular 2 - Typescript
Angular 2  - TypescriptAngular 2  - Typescript
Angular 2 - TypescriptNathan Krasney
 
Typescript tips & tricks
Typescript tips & tricksTypescript tips & tricks
Typescript tips & tricksOri Calvo
 
TypeScript Seminar
TypeScript SeminarTypeScript Seminar
TypeScript SeminarHaim Michael
 
TypeScript: Un lenguaje aburrido para programadores torpes y tristes
TypeScript: Un lenguaje aburrido para programadores torpes y tristesTypeScript: Un lenguaje aburrido para programadores torpes y tristes
TypeScript: Un lenguaje aburrido para programadores torpes y tristesMicael Gallego
 
TypeScript: особенности разработки / Александр Майоров (Tutu.ru)
TypeScript: особенности разработки / Александр Майоров (Tutu.ru)TypeScript: особенности разработки / Александр Майоров (Tutu.ru)
TypeScript: особенности разработки / Александр Майоров (Tutu.ru)Ontico
 
Why TypeScript?
Why TypeScript?Why TypeScript?
Why TypeScript?FITC
 
Александр Русаков - TypeScript 2 in action
Александр Русаков - TypeScript 2 in actionАлександр Русаков - TypeScript 2 in action
Александр Русаков - TypeScript 2 in actionMoscowJS
 
TypeScript Introduction
TypeScript IntroductionTypeScript Introduction
TypeScript IntroductionDmitry Sheiko
 
TypeScript for Java Developers
TypeScript for Java DevelopersTypeScript for Java Developers
TypeScript for Java DevelopersYakov Fain
 
«Typescript: кому нужна строгая типизация?», Григорий Петров, MoscowJS 21
«Typescript: кому нужна строгая типизация?», Григорий Петров, MoscowJS 21«Typescript: кому нужна строгая типизация?», Григорий Петров, MoscowJS 21
«Typescript: кому нужна строгая типизация?», Григорий Петров, MoscowJS 21MoscowJS
 
TypeScript: Angular's Secret Weapon
TypeScript: Angular's Secret WeaponTypeScript: Angular's Secret Weapon
TypeScript: Angular's Secret WeaponLaurent Duveau
 
Typescript + Graphql = <3
Typescript + Graphql = <3Typescript + Graphql = <3
Typescript + Graphql = <3felixbillon
 
Typescript in 30mins
Typescript in 30mins Typescript in 30mins
Typescript in 30mins Udaya Kumar
 

Viewers also liked (16)

Angular 2 - Typescript
Angular 2  - TypescriptAngular 2  - Typescript
Angular 2 - Typescript
 
Typescript tips & tricks
Typescript tips & tricksTypescript tips & tricks
Typescript tips & tricks
 
TypeScript Seminar
TypeScript SeminarTypeScript Seminar
TypeScript Seminar
 
TypeScript: Un lenguaje aburrido para programadores torpes y tristes
TypeScript: Un lenguaje aburrido para programadores torpes y tristesTypeScript: Un lenguaje aburrido para programadores torpes y tristes
TypeScript: Un lenguaje aburrido para programadores torpes y tristes
 
TypeScript
TypeScriptTypeScript
TypeScript
 
TypeScript: особенности разработки / Александр Майоров (Tutu.ru)
TypeScript: особенности разработки / Александр Майоров (Tutu.ru)TypeScript: особенности разработки / Александр Майоров (Tutu.ru)
TypeScript: особенности разработки / Александр Майоров (Tutu.ru)
 
Why TypeScript?
Why TypeScript?Why TypeScript?
Why TypeScript?
 
TypeScript Presentation
TypeScript PresentationTypeScript Presentation
TypeScript Presentation
 
Александр Русаков - TypeScript 2 in action
Александр Русаков - TypeScript 2 in actionАлександр Русаков - TypeScript 2 in action
Александр Русаков - TypeScript 2 in action
 
TypeScript Introduction
TypeScript IntroductionTypeScript Introduction
TypeScript Introduction
 
TypeScript for Java Developers
TypeScript for Java DevelopersTypeScript for Java Developers
TypeScript for Java Developers
 
«Typescript: кому нужна строгая типизация?», Григорий Петров, MoscowJS 21
«Typescript: кому нужна строгая типизация?», Григорий Петров, MoscowJS 21«Typescript: кому нужна строгая типизация?», Григорий Петров, MoscowJS 21
«Typescript: кому нужна строгая типизация?», Григорий Петров, MoscowJS 21
 
TypeScript: Angular's Secret Weapon
TypeScript: Angular's Secret WeaponTypeScript: Angular's Secret Weapon
TypeScript: Angular's Secret Weapon
 
Typescript + Graphql = <3
Typescript + Graphql = <3Typescript + Graphql = <3
Typescript + Graphql = <3
 
Typescript in 30mins
Typescript in 30mins Typescript in 30mins
Typescript in 30mins
 
TypeScriptで快適javascript
TypeScriptで快適javascriptTypeScriptで快適javascript
TypeScriptで快適javascript
 

Similar to Typescript

Similar to Typescript (20)

Learn ActionScript programming myassignmenthelp.net
Learn ActionScript programming myassignmenthelp.netLearn ActionScript programming myassignmenthelp.net
Learn ActionScript programming myassignmenthelp.net
 
Typescript: Beginner to Advanced
Typescript: Beginner to AdvancedTypescript: Beginner to Advanced
Typescript: Beginner to Advanced
 
Apex code (Salesforce)
Apex code (Salesforce)Apex code (Salesforce)
Apex code (Salesforce)
 
E learning excel vba programming lesson 3
E learning excel vba programming  lesson 3E learning excel vba programming  lesson 3
E learning excel vba programming lesson 3
 
c++ Unit I.pptx
c++ Unit I.pptxc++ Unit I.pptx
c++ Unit I.pptx
 
Python Programming
Python ProgrammingPython Programming
Python Programming
 
Learning core java
Learning core javaLearning core java
Learning core java
 
Md03 - part3
Md03 - part3Md03 - part3
Md03 - part3
 
Introduction to Java Object Oiented Concepts and Basic terminologies
Introduction to Java Object Oiented Concepts and Basic terminologiesIntroduction to Java Object Oiented Concepts and Basic terminologies
Introduction to Java Object Oiented Concepts and Basic terminologies
 
L2 datatypes and variables
L2 datatypes and variablesL2 datatypes and variables
L2 datatypes and variables
 
Java script basics
Java script basicsJava script basics
Java script basics
 
Java
JavaJava
Java
 
Android webinar class_java_review
Android webinar class_java_reviewAndroid webinar class_java_review
Android webinar class_java_review
 
Java
JavaJava
Java
 
Enumerations in java.pptx
Enumerations in java.pptxEnumerations in java.pptx
Enumerations in java.pptx
 
COMPUTER PROGRAMMING LANGUAGE.pptx
COMPUTER PROGRAMMING LANGUAGE.pptxCOMPUTER PROGRAMMING LANGUAGE.pptx
COMPUTER PROGRAMMING LANGUAGE.pptx
 
Complete Notes on Angular 2 and TypeScript
Complete Notes on Angular 2 and TypeScriptComplete Notes on Angular 2 and TypeScript
Complete Notes on Angular 2 and TypeScript
 
12.6-12.9.pptx
12.6-12.9.pptx12.6-12.9.pptx
12.6-12.9.pptx
 
Java introduction
Java introductionJava introduction
Java introduction
 
Java Script
Java ScriptJava Script
Java Script
 

Recently uploaded

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 Scriptwesley chun
 
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
 
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
 
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
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
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
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 

Recently uploaded (20)

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
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
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
 
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
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
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
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 

Typescript

  • 1. Neal Creative | click & Learn more Neal Creative © TIP │ Use the built-in color palette with green and yellow for callouts and accents
  • 5. Abstraction is a process where you show only “relevant” data and “hide” unnecessary details from the user Encapsulation is the process of combining data and functions into a single unit Modularity is the act of partitioning a program into single units Polymorphism is the ability of a message or data to be processed in more than one form Inheritance is the capability of one class to inherit properties from another class Basic Characteristics of Object Oriented Programming 1 2 3 4 5
  • 6. 6 JavaScript Objects OBJECT Property 1 Property 2 Property 3 Property 4 Property 5 Property 6
  • 8. 1
  • 10. VARIABLES • Variables is a container to hold data and is done by var keyword or let keyword. • If we skip keyword to declare a variable we get an error message as “cannot find name”. Example:
  • 11. Let vs Var Keyword • The scope of a variable defined with var is global scope or declared outside any function. • The scope of a variable defined with let is block scope. Example:-
  • 12. 12 TYPES • Type is a classification of data which tells the compiler or interpreter how the programmer intends to use the data(example : number, string). • TypeScript is a strongly typed language and JavaScript is a weakly typed language. • TypeScript has a small number of build-in types, including, 1. Number 2. String 3. Boolean 4. Array 5. Enum 6. Void & Any
  • 13. Number & String Types • The number type can be any set of any numbers • The string type can be any string-i.e,any sequence of Unicode characters encloses within a single or double quotes
  • 14. • You can also use template strings, which can span multiple lines and have embedded expressions. These strings are surrounded by the backtick/backquote (`) character, and embedded expressions are of the form ${ expr }.
  • 15. Boolean Types • Booleans have only two valid value true/false • Before version 0.9 of typeScript, the Boolean type was described using bool keyword. There was a breaking change in the 0.9 TypeScript language specifications, which changed the keyword to boolean
  • 16. Enum • Enums allow us to define a set of named numeric constants. • An enum can be defined using the enum keyword
  • 17. Array Types • Array types define both that a variable is an array and the kind of elements it contain. • Syntax:- 1. var [identifier]:type=[]; 2. var [identifier]:Array<type>=[]; • Example:-
  • 18. Any& Void types • The any data type is the super type of all types in TypeScript. It denotes a dynamic type.if we don’t know a particular type we can choose any type • void is a little like the opposite of any: the absence of having any type at all. You may commonly see this as the return type of functions that do not return a value
  • 19. 19 Operators • Operators are user for some operations on data. • All the standard JavaScript operators are available in TypeScript and they are, 1. Increment and Decrement Operator (“++“, “--“) 2. Binary Operator (“+“, “-“, “/“, “*“, “%“) 3. Bitwise Operator("~" , "&”, "|", "^" ,"<<" ,">>“) 4. Comparison Operators (“==" , “!=“ , “>", “<" ,"<=“, ”>=”) 5. Logical Operator (“&&“, “||“, ”!”) 6. Conditional Operator(“?:“)
  • 20. 20 Functions • Function is a block of code designed to perform a particular task. • Similar to JavaScript function. • Several optional features:types,optional parameters,default parameters. • A parameter is a variable in a method definition. When a method is called, the arguments are the data you pass into the method's parameters. Example:-
  • 21. 21 Optional Parameters • Parameters are required by default in TypeScript and we are creating an optional parameters with a question mark(?). • Example:-
  • 22. 22 Default Parameters • In Default parameters we are simply assigning some text as default value.when ever we omitted the argument default value is taken. Example:-
  • 23. 23 Class • Class is a way to bind data's and functions relating to any entity together. • Classes are defined with the class keyword and instantiated with the new keyword. • The syntax should look familiar if you’ve used C# or Java before.
  • 24. 24 Inheritance • Classes can inherit properties from other classes • A class inherits from another class using the extends keyword. • Child class inherits all methods and properties Example:-
  • 25. 25 Access Modifiers • Typescript supports the common access modifiers that control class members access. • Typescript access modifiers are : 1. public : available on instances everywhere 2. private : not available for access outside the class. 3. protected : available on child classes but not on instances directly.