title: Typescript export both class and types
body: <p>So I made my own type def for a module:</p>
  
  <pre><code>declare module 'fs-tree-diff' {
    interface FSEntry {
      relativePath: string;
      mode: number;
      size: number;
      mtime: number;
      isDirectory: () =&gt; boolean;
    }
  
    type Operation = 'unlink' | 'create' | 'mkdir' | 'change' | 'rmdir';
    type PatchEntry = [Operation, string, FSEntry];
    type Patch = PatchEntry[];
  
    type FSEntries = FSEntry[];
  
    class FSTree {
      constructor (options: {entries: FSEntries, sortAndExpand?: boolean});
      static fromEntries (entries: FSEntries): FSTree;
      static fromPaths (paths: string[]): FSTree;
      addEntries (entries: FSEntries, options: {sortAndExpand: boolean}): void;
      addPath (paths: string[], options: {sortAndExpand: boolean}): void;
      forEach (fn: any, context: any): void;
      calculatePatch (other: FSTree, isEqual?: (a: FSEntry, b: FSEntry) =&gt; boolean): Patch;
    }
  
    export = FSTree;
  }
  </code></pre>
  
  <p>So now, I can do that anywhere:</p>
  
  <pre><code>import FSTree = require('fs-tree-diff');
  
  const tree = new FSTree({entries: []});
  </code></pre>
  
  <p>and it works! But I would like now to be able to do </p>
  
  <pre><code>import FSTree = require('fs-tree-diff');
  
  const tree = new FSTree({entries: []});
  let entry: FSTree.FSEntry;
  ...
  </code></pre>
  
  <p>If I try to add <code>export</code> before every <code>type</code>  in my module declaration it says at the end on <code>export = ...</code> that it can't export with other exports. How can I access my defs from another file?</p>