SlideShare ist ein Scribd-Unternehmen logo
1 von 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

Weitere ähnliche Inhalte

Was ist angesagt?

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
 

Was ist angesagt? (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
 

Andere mochten auch

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
 

Andere mochten auch (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
 

Ähnlich wie Typescript

Ähnlich wie 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
 

Kürzlich hochgeladen

Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 

Kürzlich hochgeladen (20)

Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 

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.