From TypeScript webpage: \"The most basic datatype is the simple true/false value, which JavaScript and TypeScript call a boolean value.\"
Ok so far so good, it\'s just
you do not need to compare true/false values with ==/=== because they are already boolean values themselves. thus making it redundant.
so just do if (a) or if (!a)
if (a)
if (!a)
typescript just wants to optimize your code this way. in vanilla JS it is perfectly fine to do if (a === true)
if (a === true)