VSCode: How to document promise that resolves with complex object?

Viewed 2715

I have a function f that returns a Promise. The returned Promise either resolve({name: String, data: Object}) or reject(Error).

I've tried the following syntax(as mentioned in an issue in JSDoc) in VSCode, but it doesn't work:

/**
 * @promise fPromise
 * @reject {Error}
 * @fulfill {Object} project
 * @fulfill {Object} project.data
 * @fulfill {String} project.name
 * @returns fPromise
*/
2 Answers
Related