How to replace <reference path/> directive with ESM import?
<p>I'm trying to write a TypeScript application and came to a conclusion that I don't like the <code>&lt;reference path /&gt;</code> triple-slash directive. I find it more suitable to use <code>import 'something'</code> instead.</p>
<p>But when I try to replace my reference paths I keep getting an error that module is unknown.</p>
<p>Here's my folder structure:</p>
<pre><code>/app
    /ViewModels
        ApplicationViewModel.ts
    app.ts
</code></pre>
<p>ApplicationViewModel.ts</p>
<pre><code>module ApplicationVM {
    export class ApplicationViewModel {
        constructor(public test:string) {
        }
    }
}
</code></pre>
<p>app.ts</p>
<pre><code>/// &lt;reference path=&quot;ViewModels/ApplicationViewModel.ts&quot; /&gt;

var a = new ApplicationVM.ApplicationViewModel('test');
</code></pre>
<p>this one works just fine. How do I get following code to work as well?</p>
<pre><code>import * as App from 'noidea';
var a = new App.ApplicationViewModel('test');
</code></pre>
<p>For 'noidea' I tried: <code>ViewModels/ApplicationViewModel</code>, <code>ApplicationVM</code> asl. I even combined it with <code>&lt;reference path /&gt;</code> but it didn't help as well.</p>