title: How to import plotly.js into TypeScript?
body: <p>I'm trying to import <code>plotly.js</code> into TypeScript. Plotly.js is installed using <code>npm</code>. In my TypeScript file I use </p>
  
  <pre><code>import 'plotly.js';
  </code></pre>
  
  <p>It's OK but I'm getting error on code like <code>Plotly.&lt;member&gt;</code>:</p>
  
  <pre><code>error TS2304: Cannot find name 'Plotly'
  </code></pre>
  
  <p>When I try </p>
  
  <pre><code>import Plotly = require('plotly.js');
  </code></pre>
  
  <p>I'm getting </p>
  
  <pre><code>error TS2307: Cannot find module 'plotly.js'.
  </code></pre>