title: Exporting default value from a module in Typescript declaration file
body: <p>Let's say I have a declarations file <code>foo.d.ts</code>:</p>
  
  <pre><code>declare namespace foo {
    interface Bar {
      (): void;
    }
  }
  
  declare var foo: foo.Bar;
  export default foo;
  </code></pre>
  
  <p>If I compile this:</p>
  
  <pre><code>import Foo from './foo';
  Foo();
  </code></pre>
  
  <p>The resulting output is:</p>
  
  <pre><code>"use strict";
  var foo_1 = require('./foo');
  foo_1["default"]();
  </code></pre>
  
  <p>However this code won't run as <code>foo_1</code> is a function and has no property <code>default</code>. How can I get the output to be <code>foo_1()</code> instead of <code>foo_1["default"]()</code>?</p>