> 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-null.md).

# TS - Null

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

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

<figure><img src="/files/2lhp89Z7IjufgKpLpMgL" 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);
```
