> For the complete documentation index, see [llms.txt](https://afatihyavasi.gitbook.io/typescript-notlari/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://afatihyavasi.gitbook.io/typescript-notlari/handbook/modueller.md).

# Modül Yapısı

**TypeScript** ES Module yapısını destekler. Örneğin tip tanımlamalarını yaptığımız **types.ts** adında bir dosyamız olsun.&#x20;

{% code title="types.ts" %}

```typescript
type User = {
    name: string;
    id: number;
}

export {User};
```

{% endcode %}

�Oluşturduğumuz **User** isimli tip objesini projemizin farklı yerlerinde kullanmak istiyoruz. Kullanmak için tek yapmamız gereken **User**'ı dosyamıza import etmek.

{% code title="index.js" %}

```typescript
import {User} from "./types";

let users:User;
users = {name:'Osman',id:142}
```

{% endcode %}

�
