title: TypeScript / JavaScript - import all types
body: <p>How can I import all types from certain file?</p>
  
  <p>Let's say I have <code>myClass.ts</code> and <code>otherClass.ts</code>.
  I want to import all classes from <code>otherClass.ts</code>.</p>
  
  <p>I've seen few syntaxes for imports.</p>
  
  <pre><code>import ClassA, { ClassB, ClassC } from 'otherClass';
  
  import * as foo from 'otherClass';
  
  import foo = require('otherClass');
  
  import 'rxjs/Rx';
  </code></pre>
  
  <ol>
  <li><p>The first needs me to list everything. I'd like to import all types.</p></li>
  <li><p>The second syntax needs the namespace prefix: <code>foo.ClassA</code>.</p></li>
  <li><p>I understand that the last one is TypeScript 1.4, but still supported.</p></li>
  </ol>
  
  <p>Is there something like the following?</p>
  
  <pre><code>import * from "otherClass";
  ...
     var x = new ClassA()
  </code></pre>
  
  <p>Also, what's the meaning of the <code>{ ... }</code> and some of the types being outside and some inside? </p>
  
  <p>The <a href="https://www.typescriptlang.org/docs/handbook/modules.html" rel="noreferrer">documentation</a> doesn't hint anything such.</p>