Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to enable strict null check for vscode

As Typescript introduces strict null check for dynamic runtime errors, it would be great if enabled. I couldn't find any docs or guidelines on how to enable it.

How do I enable strict null check inside VSCode ?

like image 770
bigopon Avatar asked Mar 11 '23 21:03

bigopon


1 Answers

couldn't find any docs or guidelines on how to enable it.

Just use tsconfig.json's compilerOptions. E.g.

{
  "compilerOptions": {"strictNullChecks":true}
}
like image 65
basarat Avatar answered Mar 13 '23 10:03

basarat