title: Onclick & boolean switch
body: <p>I have tried to make an function with a onclick that when you click it, it will change the  value from 'suspended' in true (this is about suspending a website user account)</p>
  <pre><code>suspended = false; 
  type user = User['suspended'];
  
  function blokkeerFunctie() {
    // get user &amp; user element
    document.getElementById('userInfo') &amp;&amp; document.getElementById('blokkeren');
    // blocks user when clicked
    if (document.getElementById('blokkeer')?.addEventListener('click', blokkeerFunctie)) {
      type user = !User['suspended'];
    } else {
      // deblocks user when clicked
      document.getElementById('deblokkeer')?.addEventListener('click', blokkeerFunctie);
      type user = User['suspended'];
    }
    console.log('blokkeerFunctie');
  }
  blokkeerFunctie();
  </code></pre>
  <p>I thought with !User i will reverse the boolean value from false in true, but that code isn't even read. ▼</p>
  <p>'user' is declared but never used.ts(6196)</p>