title: TypeScript: Can I import a folder without having to write an index.ts file?
body: <p>If most directories of a project contain no more than 2-3 TypeScript files and all of their exports should be accessible when importing the containing directory somewhere else, this results in a lot of <code>index.ts</code> files with predictable content.</p>
  
  <h2>Example</h2>
  
  <p>Directory: <code>my-component</code></p>
  
  <pre><code>my-component-config.ts
  my-component.ts
  index.ts
  </code></pre>
  
  <p>What does <code>index.ts</code> contain? Of course, it contains</p>
  
  <pre><code>export * from "./my-component-config"
  export * from "./my-component"
  </code></pre>
  
  <p>Which is obvious.</p>
  
  <p>For 10 component directories, that means: 10 <code>index.ts</code> files containing 100% redundant information.</p>
  
  <p><strong>How can I make TypeScript(/Node) implicitly create <code>index.ts</code> files on the fly, that need not be stored on the hard disk?</strong></p>