title: What is 'declare global' in Typescript?
body: <p>What is &quot;declare global&quot; and how is it possible ? I found this code inside Lodash typings. The problem is that when I try to replicate this into <code>my.d.ts</code> file exactly since global is not a namespace, module, function or var, I'm not allowed to do it. So question is how this declaration is possible in Typescript.</p>
  <p>PS
  So maybe there are some additional compiler options which will allow this?</p>
  <pre><code>declare global {
      interface Set&lt;T&gt; { }
  }
  </code></pre>