title: How to generate JSDoc for `pipe`d ES6 function
body: <p>I have a ES6-style function that is defined using function composition with <code>asyncPipe</code>.</p>
  
  <pre class="lang-js prettyprint-override"><code>import { getItemAsync } from 'expo-secure-store';
  
  const asyncPipe = (...fns) =&gt; x =&gt; fns.reduce(async (y, f) =&gt; f(await y), x);
  
  const getToken = () =&gt; getItemAsync('token');
  
  const liftedGetToken = async ({ ...rest }) =&gt; ({
    token: await getToken(),
    ...rest,
  });
  
  const liftedFetch = ({ body, route, token, method = 'GET' } = {}) =&gt;
    fetch(route, {
      ...(body &amp;&amp; { body: JSON.stringify(body) }),
      headers: {
        'Content-Type': 'application/json',
        ...(token &amp;&amp; { Authorization: `Bearer ${token}` }),
      },
      method,
    });
  
  const json = res =&gt; res.json();
  
  /**
   * @method
   * @param {Object} fetchSettings the settings for the fetch request
   * @param {Object} fetchSettings.body the body of the request
   * @param {string} fetchSettings.route the URL of the request
   * @param {string} fetchSettings.method the method of the request
   * @param {string} fetchSettings.token should only be used for testing and unauthenticated requests
   */
  const request = asyncPipe(liftedGetToken, liftedFetch, json);
  </code></pre>
  
  <p>As you can see I tried adding a JSDoc description to it. But when I use it anywhere my editor, VSCode, doesn't suggest its parameters. How do you declare these kinds of functions with JSDoc? And how do I get params for this function to work with Intellisense?</p>