An exception that Typescript cannot track. Still, don't use !s

20 August 2020

protypescriptprogramming

Run in typescript playground

In such case, one of the solutions is to simply keep the !!a.aField check, and then introduce new variable/s inside the if check