title: Why is TypeScript adding .default to a globally defined import?
body: <p>I have an external library <code>thing.d.ts</code> file with a global definition inside:</p>
  
  <pre><code>declare var thing: ThingStatic;
  export default thing;
  </code></pre>
  
  <p>I reference npm module in my TypeScript:</p>
  
  <pre><code>import thing from 'thing';
  ...
  thing.functionOnThing();
  </code></pre>
  
  <p>When I transpile the TS (targeting ES6) it looks something like this:</p>
  
  <pre><code>const thing_1 = require("thing");
  ...
  thing_1.default.functionOnThing();
  </code></pre>
  
  <p>This then throws an error:</p>
  
  <blockquote>
    <p>Cannot read property 'functionOnThing' of undefined</p>
  </blockquote>
  
  <p>Why is TypeScript adding <code>.default</code> between <code>thing_1</code> and <code>functionOnThing()</code>?</p>
  
  <p>There is no property named <code>default</code> on <code>ThingStatic</code>, and no <code>default</code> property on the underlying JS object that the <code>.d.ts</code> file defines.</p>
  
  <p>Why is TypeScript adding the property and how do I stop it?</p>