title: import * as iterable array in TypeScript
body: <p><strong>How can I access multiple classes in different files, as array, using TypeScript?</strong></p>
  
  <p>folder structure:</p>
  
  <pre><code>├── index.ts
  └── models
      ├── index.ts
      ├── image.entity.ts
      └── user.entity.ts
  </code></pre>
  
  <p>image.entity.ts:</p>
  
  <pre><code>export class Image { }
  </code></pre>
  
  <p>user.entity.ts:</p>
  
  <pre><code>export class User { }
  </code></pre>
  
  <p>models/index.ts:</p>
  
  <pre><code>export * from './image.entity';
  export * from './user.entity';
  </code></pre>
  
  <p>index.ts (desired output):</p>
  
  <pre><code>import * as models from './models/index';
  // Is an iterable array, instead of a "module"
  console.log(models.length) // 2
  </code></pre>