title: If I use `module("somelib")` in typescript, it can't be running in browser
body: <p>I'm trying to use typescript with angularjs in the client-side.</p>
  
  <p>I found if I use external modules, the generated js won't be run in browser.</p>
  
  <p><strong>controllers.ts</strong></p>
  
  <pre><code>/// &lt;reference path="./libs/underscore.d.ts"/&gt;
  
  import _ = module("underscore");
  
  module test {
      export class Ctrl {
  
          constructor($scope:any) {
              $scope.name = "Freewind";
              _.each($scope.name, function(item) {});
          }
      }
  }
  </code></pre>
  
  <p>The generated js will be:</p>
  
  <pre><code>var _ = require("underscore")
  var test;
  (function (test) {
      var Ctrl = (function () {
          function Ctrl($scope) {
              $scope.name = "Freewind";
              _.each($scope.name, function (item) {
              });
          }
          return Ctrl;
      })();
      test.Ctrl = Ctrl;    
  })(test || (test = {}));
  </code></pre>
  
  <p>Which can't run correctly. But if I remove the <code>module("underscore")</code> part, it will be OK.</p>
  
  <p>Since I have add underscore.js in the HTML, I think it should be something wrong with the <code>require()</code> method. How to fix it?</p>