Skip to content
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

Chore/move to async for prompts #12812

Merged
merged 11 commits into from
Oct 22, 2020

Conversation

sendilkumarn
Copy link
Member

@sendilkumarn sendilkumarn commented Oct 21, 2020


Please make sure the below checklist is followed for Pull Requests.

When you are still working on the PR, consider converting it to Draft (bellow reviewers) and adding skip-ci label, you can still see CI build result at your branch.

@avdev4j
Copy link
Contributor

avdev4j commented Oct 22, 2020

Hi @sendilkumarn
what is the main pros to move to async function instead of using "done()"?

Copy link
Member

@mshima mshima left a comment

Choose a reason for hiding this comment

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

LGTM

@mshima
Copy link
Member

mshima commented Oct 22, 2020

Hi @sendilkumarn
what is the main pros to move to async function instead of using "done()

I see the following reasons:

  • more linear, in this case 1 level is not too much.
  • better error handling: promises should have a catch block.
  • easier then promise notation new Promise().then(resolved => done(undefined, resolved), error => done(error))

@sendilkumarn
Copy link
Member Author

All that @mshima told + more readability

@sendilkumarn sendilkumarn merged commit 99e12ce into jhipster:main Oct 22, 2020
@sendilkumarn sendilkumarn deleted the chore/move-to-async branch October 22, 2020 10:04
@pascalgrimaud pascalgrimaud added this to the 7.0.0-beta.0 milestone Dec 18, 2020
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.

4 participants