title: How to specify resolution and rejection type of the promise in JSDoc?
body: <p>I have some code that returns a promise object, e.g. using <a href="https://github.com/kriskowal/q" rel="noreferrer">Q</a> library for NodeJS.</p>
  
  <pre class="lang-js prettyprint-override"><code>var Q = require('q');
  
  /**
   * @returns ???
   */
  function task(err) {
      return err? Q.reject(new Error('Some error')) : Q.resolve('Some result');
  }
  </code></pre>
  
  <p>How to document such a return value using JSDoc?</p>