title: Using Compiled typescript module in another typescript file
body: <p>Trying to get up to speed with typescript and module bundling system and stuck against some scenarios.</p>
  
  <p>I have created a functions library in typescript, lets say <strong>"code1.ts"</strong> and compiled it and generated a java script <strong>"code1.js"</strong> out of it. </p>
  
  <p>Now I have hosted <strong>"code1.js"</strong> on web server as <strong>"http://server1/lib/code1.js"</strong> so that I can use it in a different web project.</p>
  
  <p>In my new web project I am writing typescript and I want to use some function/methods from the <strong>"http://server1/lib/code1.js"</strong>.</p>
  
  <p>With above setup I am looking answers for the following queries:</p>
  
  <ol>
  <li><p>First how to refer and get module references of <strong>"code1.ts"</strong>  in <strong>"code2.ts"</strong> from the <strong>"http://server1/lib/code1.js"</strong>. I don't want to embed the <strong>"code1.js"</strong> in the web project, I just want to refer it from this URL.</p></li>
  <li><p>Secondly if I use any web bundling system like webpack etc. in the web project I want to avoid downloading and embedding of the <strong>"http://server1/lib/code1.js"</strong> content in the web project distribution build.</p></li>
  </ol>