title: Export imported modules using Typescript AMD
body: <p>Assuming I've implemented this two interesting Typescript libraries as AMD modules.</p>
  
  <p><strong>MathBasics.ts</strong></p>
  
  <pre><code>module MathBasics {
      export function add(a: number, b: number) {
          return a + b;
      }
      export function substract(a: number, b: number) {
          return a - b;
      }
  }
  export = MathBasics
  </code></pre>
  
  <p><strong>MathAdvanced.ts</strong></p>
  
  <pre><code>module MathAdvanced {
      export function mult(a: number, b: number) {
          return a * b;
      }
      export function div(a: number, b: number) {
          return a / b;
      }
  }
  export = MathAdvanced
  </code></pre>
  
  <p>How can I combine them in one MathAll.ts library so client code doesn't have to reference both of it.</p>
  
  <p><strong>MathAll.ts</strong></p>
  
  <pre><code>import MathBasics = require("MathBasics");
  import MathAdvanced = require("MathAdvanced"); 
  
  module MathAll {
      export var MathBasics: MathBasics;  
      export var MathAdvanced : MathAdvanced;
      //Error: Type reference cannot refer to container 
  
      export module MathBasics;
      export module MathAdvanced;
      //Error: '{' expected
  
      export MathBasics;
      export MathAdvanced;
      //Error: Unexpected token; 'module, class, interface, enum, import or statement' expected.
  
  }
  
  export = MathAll;
  </code></pre>
  
  <p>I don't care right now whether there are 1 or 3 requests being made. My question is more about development convenience than performance.  </p>