> For the complete documentation index, see [llms.txt](https://lwin-moe-paing.gitbook.io/typescript-baby-by-lwin-moe-paing/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://lwin-moe-paing.gitbook.io/typescript-baby-by-lwin-moe-paing/basic-typescript/ts-intersection.md).

# TS - Intersection

### Intersection

<figure><img src="/files/PYOLkLQ8vCsoaBP7r71i" alt=""><figcaption></figcaption></figure>

TypeScript မှာ `Intersection (&)` Operator ကို Type တွေကို ပေါင်းစပ် (combine) လုပ်ဖို့သုံးပါတယ်။  Type နှစ်ခု (သို့မဟုတ် ပိုများတဲ့ Type) ကို ပေါင်းစပ်ပြီး  အားလုံးရဲ့ property တွေ ပါဝင်တဲ့ Type အသစ်တစ်ခု ဖန်တီးနိုင်ပါတယ်။

<figure><img src="/files/rg9YcRNWJ6dKIvNf8k2F" alt=""><figcaption></figcaption></figure>

Code ကို တစ်ချက် လေ့လာကြည့်ပေးပါ ။

`People` Type နဲ့ `AdminRole` Type ကို `(&)` နဲ့ ပေါင်းစပ်လိုက်တာပဲ ဖြစ်ပါတယ် ။&#x20;

ဒါဆိုရင် `Admin` Type အသစ်မှာ properties အားလုံးကို လက်ခံရရှိသွားမှာပါ ။
