TypeScript Classes Tutorial for JavaScript Developers | #typescripttutorial

preview_player
Показать описание
In This tutorial we will learn about Classes, member variable, constructor, member functions in TypeScript. We will code examples of Classes & see the results.

Class - TypeScript adds types and visibility modifiers to JavaScript classes.

1. Members: Types - The members of a class (properties & methods) are typed using type annotations, similar to variables.

2. Members: Visibility - Class members also be given special modifiers which affect visibility. There are three main visibility modifiers in TypeScript.
a. public - (default) allows access to the class member from anywhere
b. private - only allows access to the class member from within the class
c. protected - allows access to the class member from itself and any classes that inherit it, which is covered in the inheritance section below

3. Parameter Properties - TypeScript provides a convenient way to define class members in the constructor, by adding a visibility modifiers to the parameter.

4. Readonly - Similar to arrays, the readonly keyword can prevent class members from being changed.

5. Inheritance: Implements - Interfaces (covered here) can be used to define the type a class must follow through the implements keyword. A class can implement multiple interfaces by listing each one after implements, separated by a comma.

6. Inheritance: Extends - Classes can extend each other through the extends keyword. A class can only extends one other class.

7. Override When a class extends another class, it can replace the members of the parent class with the same name. Newer versions of TypeScript allow explicitly marking this with the override keyword.

8. Abstract Classes - Classes can be written in a way that allows them to be used as a base class for other classes without having to implement all the members. This is done by using the abstract keyword. Members that are left unimplemented also use the abstract keyword.

** CHAPTER **
0:00 Welcome to Tutorial
0:30 Previous Video – Recap
1:13 Agenda of Tutorial
2:27 Class in TypeScript
3:16 Class Member Types
4:44 Member Visibility
7:35 Parameter Properties
9:29 Readonly Properties
11:54 Inheritance Implements
13:34 Inheritance Extends
14:58 Overriding Methods
15:41 Abstract Classes
17:39 Running the code
18:52 GIT Repository

#typescripttutorial #typescript #typescriptdevelopment

** Previous Video Tutorial **
TypeScript Function & Casting Tutorial for JavaScript Developers | #typescripttutorial

** TypeScript Complete Tutorial Playlist **

** GIT Repository **

** CHECK OUT OUR OTHER VIDEOS **
Create AWS EC2 Instance and Run Springboot Microservice and MongoDB in EC2 Server

** CHECK OUR PLAYLISTS **
AWS Cloud and Docker Containers Complete Tutorial
CodeOneDigest Learning Shorts
Complete Python Learning Tutorial Playlist

** ABOUT OUR CHANNEL **
CodeOneDigest is a youtube channel for the videos on programming language, cloud and docker container technology in English and Hindi languages.

Check out our channel here:
Don’t forget to subscribe!

** OUR WEBSITE **

** GET IN TOUCH **

FOLLOW US ON SOCIAL - LIKE, SHARE & SUBSCRIBE
Get updates or reach out to Get updates on our Social Media Profiles!
Рекомендации по теме
Комментарии
Автор


Check out this new video on the CodeOneDigest YouTube channel! Learn Classes in typescript. Learn how to write Class in typescript and how to define member variable in the class in typescript programming language. #video #typescript #class #membervariable #memberfunction #nodejs #javascript #codeonedigest
@java @awscloud @AWSCloudIndia @YouTube @codeonedigest #typescript #javascript #typescript #typescript #learntypescript #typescripttutorial #typescriptclass #typescriptfullcourse #typescriptclassconstructor #typescriptclasscomponent #typescriptfulltutorial #classmemberfunction #classmembermodifiers #classconstructorjavascript #typescriptinheritance #classinheritance #typescriptcrashcourse #typescriptexplained #typescriptexample #typescriptexampleproject #javascript

codeonedigest