# TS - Null

<figure><img src="https://4062235122-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7tekcoDYDaKhlNreT5uK%2Fuploads%2Fnbd83VCeKYEbVUukYjGO%2FTypescript%20Null%20Syntax.png?alt=media&#x26;token=1ec518d2-5e63-46f2-9a99-e36074e0ccda" alt=""><figcaption></figcaption></figure>

`let nullData : null = null;` ရေးထုံးနဲ့ Null Type တွေကို သတ်မှတ် လို့ရပါတယ် ။ တကယ်တော့ ဒါဟာ အဓိပ္ပါယ်မရှိပါဘူး  null type ကိုကြေငြာပြီး ဘယ်သူမှ လက်တွေ့မှာ ရေးသားလေ့မရှိဘူး ။ ဖြစ်လေ့ ဖြစ်ထရှိတဲ့ အမှားက null type inference ပဲဖြစ်ပါတယ် ။&#x20;

<figure><img src="https://4062235122-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7tekcoDYDaKhlNreT5uK%2Fuploads%2FNnPrGM8h99jtpcF1Q7eU%2FTypescript%20Null%20Type%20Inference%20Syntax.png?alt=media&#x26;token=985cef74-60a1-41f3-a48a-ddd92cb7d61e" alt=""><figcaption></figcaption></figure>

`let nullInfer = null;`  ကိုယ်တိုင် မသတ်မှတ်ပဲ inference ပုံစံ nulll value ကို ထည့်လိုက်တဲ့အခါ TypeScript က `any type` အဖြစ် အလိုအလျောက် သတ်မှတ်သွားမှာပါ ။&#x20;

```typescript
let nullInfer = null;

nullInfer = "string"; // any type ဖြစ်သွားတဲ့အတွက် ဘယ် Type ဖြစ်ဖြစ်လက်ခံလို့ရသွားပါတယ် ။

nullInfer = 2; // Error Message လည်း မပြတော့ပါဘူး

console.log(nullInfer);
```
