title: Having trouble importing javascript framework for use in Typescript class
body: <p>I'm trying to load <code>SVG.js</code> as a module so that I can utilize it within a typescript class, within an external namespace module.</p>
  
  <p>I have the <code>SVG.js</code> type definitions file loaded. The original <code>SVG.js</code> file remains as pure JavaScript.</p>
  
  <p>I cannot figure out how to import the <code>SVG.js</code> as a module so I can use it within my class. I've tried a number of import definitions and none seem to work.</p>
  
  <p>What is the correct way to import a JavaScript library for use within a Typescript class?</p>
  
  <p><strong>I've tried:</strong></p>
  
  <pre><code>import * as svg from '../../Libraries/svg-2.6.3.js';
  </code></pre>
  
  <p>Gives error "... is not a module"</p>
  
  <pre><code>import svg = require('../../Libraries/svg-2.6.3.js');
  </code></pre>
  
  <p>Gives error "...d.ts is not a module"</p>
  
  <pre><code>import '../../Libraries/svg-2.6.3.js';
  </code></pre>
  
  <p>Causes namespace references to be underlined in red, with "Cannot find name" errors.</p>