title: Correct way of importing and using lodash in Angular
body: <p>I used to be able to use a lodash method in Angular by an import statement that looked like the following:</p>
  <pre><code>import {debounce as _debounce} from 'lodash';
  </code></pre>
  <p>I now get the following error when using that statement:</p>
  <pre><code>'&quot;{...}/node_modules/@types/lodash/index&quot;' has no exported member 'debounce'.
  </code></pre>
  <p>The only thing that will compile without errors is this statement:</p>
  <pre><code>import * as _ from 'lodash'; 
  </code></pre>
  <p>In my code, I change <code>_debounce()</code> to <code>_.debounce()</code>. Is that the only (and/or correct) way to do it? Is there a way to only import debounce, or does it not matter due to &quot;treeshaking&quot;? I realize I can write my own debounce function, but I'm mainly interested in the &quot;right&quot; way to do this.</p>
  <p>p.s. Other variations that I've tried (each has some sort of error associated with it):</p>
  <pre><code>import {debounce as _debounce } from 'lodash/debounce';
  import * as _debounce from 'lodash/debounce';
  import debounce = require('lodash/debounce');
  </code></pre>
  <p>FYI...I'm using the following versions:</p>
  <blockquote>
  <p>Angular: 2.4.5</p>
  <p>Typescript: 2.1.5</p>
  <p>Angular-cli: 1.0.0-beta.26</p>
  </blockquote>