title: How to NodeJS require inside TypeScript file?
body: <p>How do I load a regular NodeJS module (from <code>node_modules</code>) from within a <code>TypeScript</code> class?</p>
  <p>When I try to compile <code>.ts</code> file that contains:</p>
  <pre><code>var sampleModule = require('modulename');
  </code></pre>
  <p>Compiler prompts that I can't use require in this scope. (That line is at the beginning of the file).</p>