Difference between 'extends' and 'implements' in TypeScript
Difference between 'extends' and 'implements' in TypeScript

Difference between 'extends' and 'implements' in TypeScript

Published
November 7, 2022
Author
Dany Paredes
class Media { format: string; } class Video extends Media {} class Image implements Media {}
The short answer:
  • extends: The class gets all these methods and properties from the parent, so you don't have to implement them.
  • implements: The class has to implement methods and properties.