---
title: "Difference between 'extends' and 'implements' in TypeScript"
date: "2021-01-28"
slug: "difference-between-extends-and-implements-in-typescript"
author: "Dany Paredes"
canonical: "https://danywalls.com/difference-between-extends-and-implements-in-typescript"
description: "Today, a friend ask about the difference between extends and implements. class Media { format: string; } class Video extends Media {} class Image implements Media {}\nThe short answer for him was: extends: The class get all these methods and proper..."
---

Today, a friend ask about the difference between `extends` and `implements`.

```typescript
class Media {
  format: string;
}
class Video extends Media {}
class Image implements Media {}
```

The short answer for him was:

extends: The class get all these methods and properties from the parent, so you don't have to implement.

implements: The class has to implement methods and properties. 

I hope this is can help someone with the same question.

_Photo by [Andrew Nemeth](https://unsplash.com/@foremostcreative?utm_source=unsplashx&utm_medium=referral) on [Unsplash](https://unsplash.com/?utm_source=unsplashx&utm_medium=referral)_

