# How to extend interfaces declared in external libraries in Typescript

> Typescript allows us to easily extend types by using module augumentation. Let's take a look at one quick example - extending the React Material Ui…

- URL: https://graffino.com/til/how-to-extend-interfaces-declared-in-external-libraries-in-typescript
- Author: Denisa Halmaghi
- Channel: typescript
- Published: 2021-12-07
- Updated: 2026-04-03

Typescript allows us to easily extend types by using module augumentation. 

Let's take a look at one quick example - extending the React Material Ui Library Theme.

All we need to do is create a file ending in *`.d.ts`* at the root of our Typescript project - in this case I'll name it **`material-ui.d.ts`**:

```ts
import {
  Theme as MuiTheme,
} from '@mui/material/styles';

declare module '@mui/material/styles' {
  export interface Theme extends MuiTheme {
    customization?: Record<string, string>;
  }
}
```
