When utilizing inheritance you can implement a base level class so you know all your objects are similar.
- [Instructor] In previous lectures, we talked about … how extends works with our parent or base class … in our child class. … Now we're going to talk about implements and how it differs. … If we were to change extends here in our Dog derived … or child class to implements, a couple things happen … that are more contextual than actually code base. … Code base-wise, we have to redefine the properties … and the methods associated with our animal class … to not necessarily be a direct child … but to actually match the same shape. … We'll be able to use them interchangeably … like we would from a parent to child but really when going … from extends to implements for matching the shape … of said parent base class. … In our case so it'll be age, number, legs, number, … and then name, string. … There's also a bit of a conversation going on … from a contextual standpoint of one being better … than the other from a readability standpoint. … Before when we were extending, if this wasn't in … the same file, you wouldn't have access to see directly …
Skill Level Intermediate
TypeScript: Upgrades and Featureswith Emmanuel Henri1h 15m Advanced
TypeScript for Node.js Developerswith Emmanuel Henri1h 2m Intermediate
1. Classes in TypeScript
2. Inheritance in TypeScript
3. Access Modifiers in TypeScript
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.