Typescript 1.8 modules: import all files from folder
<p>I am building a big library with Typescript with like 100 separate ts files.
Previously I used <strong>export module XXX</strong> (renamed to <strong>export namespace XXX</strong> later) for all my classes, but as books say, this is not a recommended way, I should use import instead.</p>

<p>So I tried importing. This worked fine:</p>

<pre><code>import * as mylib from "./source/source.ts";
</code></pre>

<p>But as I have 100 files, I don't want to add such a line for all of them. And I want all my classes to be accessible through <strong>mylib</strong> variable. </p>

<p>So I tried this:</p>

<pre><code>import * as mylib from "./source/";
</code></pre>

<p>But as soon as I do this, I get: <strong>Cannot find module './source/'</strong></p>

<p>Is there a way to import all the classes from a folder with multiple files with a single line?</p>