title: Export function as "root" of module?
body: <p>When writing a TypeScript definition, how do you declare that the definition defines a function, rather than a type? So that the function is exported as the module itself...</p>
  
  <p><strong>Definition</strong></p>
  
  <pre><code>declare module "rmdir" {
      interface IRmDirCallback {
          (err: any, dirs: Array&lt;string&gt;, files: Array&lt;string&gt;): any;
      }
  
      function rmdir(dir: string, options: any, callback: IRmDirCallback): void;
  
      export = rmdir;
  }
  
  export = rmdir.rmdir;
  </code></pre>
  
  <p><strong>Usage Example</strong></p>
  
  <pre><code>/// &lt;reference path="rmdir.d.ts"/&gt;
  
  import rmdir = require("rmdir");
  
  rmdir("test", { }, (err: any, dirs: Array&lt;string&gt;, files: Array&lt;string&gt;) =&gt; { });
  </code></pre>
  
  <p>So when I import <code>rmdir</code>, I dont' want to have to call <code>rmdir.rmdir(...)</code>.</p>