title: How do I `export * as foo from './foo'`?
body: <p>TypeScript supports <a href="https://www.typescriptlang.org/docs/handbook/modules.html#re-exports" rel="nofollow noreferrer">re-exports</a>, whereby a module can export a value imported from another module:</p>
  
  <pre><code>export {ZipCodeValidator as RegExpBasedZipCodeValidator} from "./ZipCodeValidator";
  </code></pre>
  
  <p>It also supports wildcard exports:</p>
  
  <pre><code>export * from "./StringValidator";
  </code></pre>
  
  <p>However, it does <strong>not</strong> support this syntax (<a href="https://github.com/Microsoft/TypeScript/issues/1215" rel="nofollow noreferrer">Microsoft/TypeScript#1215</a> discusses the syntax, which comes from ES6 and does not include this form):</p>
  
  <pre><code>export * as StringValidator from "./StringValidator"
  </code></pre>
  
  <p>The reason I'd like to do this is so I can split my module up into separate files, and have the TypeScript equivalent of a declaration like this:</p>
  
  <pre><code>module.exports = {
      foo: require('./foo'),
      bar: require('./bar'),
  }
  </code></pre>