How to document resolved values of JavaScript promises

Looks like you should do the following, based on some other source code's comments.

/**
 * @return {Promise.<Bar>}
 */

How JavaScript Promises are documented.

Similar question with a similar answer. Note the lack of a dot in that answer.


I like to specify that it's an async function with @async and specify the fulfilled return with @returns and error with @throws

/**
 * @async
 * @returns {Bar}
 * @throws {Error}
 */
function asyncFoo() { ... }