title: Typescript 'is not a module' error
body: <p>I have an Angular2 project where i need to import a javascript file for use in my typescript.</p>
  
  <p>I have a javascript file in app/js/d3gantt.js which contains a single function of <code>gantt = function()</code>.</p>
  
  <pre><code>gantt = function() {
      //Does lots of stuff
      return gantt;
  };
  </code></pre>
  
  <p>I then have a definition file called d3gannt.d.ts in the same folder which looks like this:</p>
  
  <pre><code>declare module 'd3Gantt' {
      export module d3Gantt {
          export function gantt(): any;
      }
  }
  </code></pre>
  
  <p>And then i reference it in my component as 
  <code>import * as d3Gantt from '../app/js/d3gantt';</code></p>
  
  <p>However, i get the error message stating <code>File 'c:/Projects/RepackLog/RepackLog/RepackLog/app/js/d3gantt.d.ts' is not a module</code></p>
  
  <p>Am i missing something that is needed for this to pick up my files properly?</p>
  
  <p>Thanks,</p>