title: TypeScript anonymous function
body: <p>What is the TypeScript equivalent of this JavaScript?</p>
  
  <pre><code>(function() { 
      /* code here */ 
  })();
  </code></pre>
  
  <p>I have tried this</p>
  
  <pre><code>() =&gt; {
      /* code here */
  }
  </code></pre>
  
  <p>But this produces</p>
  
  <pre><code>(function() {
      /* code here */
  });
  </code></pre>
  
  <p>I need the extra set of parenthesis at the end to perform an execution of the anonymous function.</p>