title: Expose TypeScript variable to JS global scope (with webpack)
body: <p>I'm using webpack to compile my TypeScript to Javascript and I want to expose a variable to the global scope so others can access it.</p>
  
  <p>I know how to do the following in TypeScript</p>
  
  <pre class="lang-js prettyprint-override"><code>window["MyVariable"] = 'Hello';
  </code></pre>
  
  <p>and read it in JavaScript like that</p>
  
  <pre class="lang-js prettyprint-override"><code>console.log(window.MyVariable);
  </code></pre>
  
  <p>But I'd prefer if I could just have it in the global scope like that.</p>
  
  <pre class="lang-js prettyprint-override"><code>console.log(MyVariable);
  </code></pre>
  
  <p>Is this possible?</p>
  
  <p>Best regards,
  Nick</p>