When developing with Promise in JavaScript, the documentation may be a hard point. Here is how I do, when documenting code with YUIDoc: /** * ... * @method doSomething * @param {Object} pOptions The Options * @return {Promise|Object} A promise of the result that returns an object in case of success  […]