# TS - Intersection

### Intersection

<figure><img src="https://4062235122-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7tekcoDYDaKhlNreT5uK%2Fuploads%2FBXIotxnRTnyddtD3ZwBH%2FTypescript%20Intersection%20Syntax.png?alt=media&#x26;token=422a226a-3ac7-43db-89f4-cd8b76a47b15" alt=""><figcaption></figcaption></figure>

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

<figure><img src="https://4062235122-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7tekcoDYDaKhlNreT5uK%2Fuploads%2Fc5oUbOI4jQGTvl4DNGzU%2FTypescript%20Intersection%20Code%20Simple.png?alt=media&#x26;token=a3b533be-9712-40e4-8685-9c3960dea451" alt=""><figcaption></figcaption></figure>

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

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

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