title: How to solve the "module has no exported member" error?
body: <p>I am following instructions from <a href="https://stackoverflow.com/a/35894727/1033686">the this answer</a>, but cannot make the solution work.</p>
  <p><strong>Overview</strong></p>
  <p>I want to use <code>import { Type } from &quot;Module&quot;</code> instead of <code>/// &lt;reference path=&quot;...&quot; /&gt;</code></p>
  <p><strong>Structure</strong></p>
  <pre><code>-app\
    -ViewModel.ts
    -Program.ts
  </code></pre>
  <p><strong>ViewModel.ts</strong></p>
  <pre><code>export module Demo {
      export class ViewModel {
          constructor(public test: string) {
          }
      }
  }
  </code></pre>
  <p><strong>Program.ts</strong></p>
  <pre><code>import { ViewModel } from &quot;ViewModel&quot;;
  </code></pre>
  <blockquote>
  <p>Module 'C:/DemoApp/app/ViewModel'
  has no exported member 'ViewModel'.</p>
  </blockquote>
  <p>and...</p>
  <blockquote>
  <p>Only 'amd' and 'system' modules are supported alongside --outFile.</p>
  </blockquote>
  <p><strong>Goal</strong></p>
  <p>I want to be able to reference dependencies so that they compile to a single file in order.</p>
  <hr />
  <p>If I add <code>&quot;module&quot;: &quot;system&quot;</code> I still get the 1st of the aforementioned errors.</p>
  <p>As per the 1st solution, I do not want to lose namespaces.</p>