Skip to content

add returning promise example for returns tag #175

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 3, 2017

Conversation

zhengzongyi
Copy link
Contributor

No description provided.

* Returns the sum of a and b
* @param {Number} a
* @param {Number} b
* @returns {Promise<Number>} Promise object represents the sum of a and b
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: change Number to number in all three type expressions

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hegemonic Done. Thank you for the suggestions.

* @returns {Promise<Number>} Promise object represents the sum of a and b
*/
function sumAsync(a, b) {
return new Promise(function(resolve, reject){
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: space before {

@zhengzongyi zhengzongyi force-pushed the add_returning_promise_example branch from 89e4833 to c95c3bf Compare August 1, 2017 05:15
@hegemonic
Copy link
Contributor

Thanks for making the changes!

@hegemonic hegemonic merged commit 7491db0 into jsdoc:master Aug 3, 2017
@zhengzongyi zhengzongyi deleted the add_returning_promise_example branch August 5, 2017 15:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants