title: How should the lodash flow function be typed in typescript?
body: <p><code>lodash.flow</code> combines two or more functions.</p>
  
  <p><code>lodash.flow(double, addTwo)</code> would return a function the would double and add two. How should this function be typed in typescript (the current definition just returns Function)?</p>
  
  <p><code>declare function flow&lt;In, Intermediate, Out&gt;(f1: (a1: In) =&gt; Intermediate, f2: (a1: Intermediate) =&gt; Out): (a1: In)=&gt; Out</code> works for two functions with the first having one input argument. I'm not sure how to extend the definition to work in all cases.</p>
  
  <p>My attempt can support mulitple functions if called like this:</p>
  
  <p><code>lodash.flow(f1, lodash.flow(f2, f3))</code></p>
  
  <p>but am looking for</p>
  
  <p><code>lodash.flow(f1, f2, f3)</code></p>