title: Is it possible to remove undefined from an array in a TypeScript will recognize?
body: <p>Is there a clean and convenient way to do something like:</p>
  
  <pre><code>const x: (string|undefined)[] = ['aaa', undefined, 'ccc'];
  const y = _.filter(x, it =&gt; !!it);
  </code></pre>
  
  <p>so that TypeScript recognizes the type of <code>y</code> as <code>string[]</code>, without having to write my own function doing the filtering? (I.e. is there a way to have the language feature that narrows the type of a variable in say an <code>if</code> block apply to arrays?)</p>