Creating a Class in TypeScript

InstructorAri Picker

Share this video with your friends

Send Tweet

Typescript classes make traditional object oriented programming easier to read and write. In this lesson we learn about class syntax, what the constructor is and some interesting variable features.

dong cai
~ 6 years ago

Putting the property inside the class ComicBookCharacter is not a very good example.

Cityblock IT Team
~ 5 years ago

Why are you able to type instance properties (like alias, health, strength, etc.) without using the ! definite assignment? I'm seeing a TS error in my own class where I must define those vars in the constructor function or use some sort of initializer