title: Import js file with TypeScript 2.0
body: <h1>Abstract</h1>
  
  <p>I'm trying to import ".js" file from an external location (i.e. <strong>node_modules</strong>) I'm trying to do this using commonjs module pattern, however <strong>import</strong> wouldn't want to work with ".js" file types until I add ".d.ts" file near ".js" file in the same folder.</p>
  
  <p>But the problem is that I wouldn't want to affect any <strong>node_modules</strong> with my ".d.ts" files. I want it to be located in another folder, separate from <strong>node_modules</strong> but as soon as I do that, typescript compiler throws an error:</p>
  
  <h1>Example</h1>
  
  <p>I have the following folder structure:</p>
  
  <pre><code>|- DTS
  |   |- y.d.ts
  |- main.ts
  |- y.js
  </code></pre>
  
  <p><strong>y.js</strong> has the following content</p>
  
  <pre><code>module.export = function (x) {
      console.log(x);
  };
  </code></pre>
  
  <p><strong>y.d.ts</strong> has the following content</p>
  
  <pre><code>export interface Y {
      (x): any;
  }
  declare let y: Y;
  export default y;
  </code></pre>
  
  <p><strong>main.ts</strong> has the following content</p>
  
  <pre><code>import * as y from './y'
  </code></pre>
  
  <p>Now when I'm trying to compile <strong>main.ts</strong> with:</p>
  
  <pre><code>tsc -m commonjs -t ES2015 main.ts
  </code></pre>
  
  <p>I will get an error:</p>
  
  <pre><code>x.ts(1,20): error TS2307: Cannot find module './y'.
  </code></pre>
  
  <h1>Question</h1>
  
  <p>How to import ".js" files and being able to define it's ".d.ts" declarations while having both files located in different locations.</p>
  
  <hr>
  
  <h1>Edit</h1>
  
  <p><a href="https://dl.dropboxusercontent.com/u/51743054/tsc/tsc.zip">Here is the link to example project</a>. Be sure to use TypeScript version 2.0 compiler. And the <code>tsc</code> command above to see the error.</p>