title: Importing node-fetch in node project with typescript
body: <p>How can I import <code>node-fetch</code> package to my node project where I use <code>typescript</code>.
  I tried it in many ways... right now I am on:</p>
  <pre><code>const fetch = (...args) =&gt;
      import(&quot;node-fetch&quot;).then(({ default: fetch }) =&gt; fetch(...args));
  </code></pre>
  <p>But I have 2 errors:</p>
  <pre><code>Cannot redeclare block-scoped variable 'fetch'.
  </code></pre>
  <p>and</p>
  <pre><code>A spread argument must either have a tuple type or be passed to a rest parameter.
  </code></pre>
  <p>When I change <code>const fetch =</code> to any other name like <code>const fetchIt =</code> it fixes first error but... do I really have to change that? How can I import <code>node-fetch</code> package in normal way where I can use <code>fetch()</code> method? In React I just make</p>
  <pre><code>import fetch from 'node-fetch';
  </code></pre>
  <p>and everything works fine... why is that so hard in <code>node</code> projects?</p>