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

Update api.md #992

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Update api.md #992

wants to merge 2 commits into from

Conversation

ali-master
Copy link

Minor improvement in API doc

minor improvement in api doc
Copy link
Member

@tofumatt tofumatt left a comment

Choose a reason for hiding this comment

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

The instructions to use async/await aren't really appropriate as code comments. They aren't describing the code: they're instructing the developer/reader directly. I'm fine to annotate the promises version a bit more clearly, but let's revert the async/await change 😄

docs/api.md Outdated Show resolved Hide resolved
@ali-master
Copy link
Author

Thanks for replying.

If you copy the Async/Await API doc with Or, use `async`/`await`: line, Javascript will throw a syntax error in this line, So It would be better if we comment this line to prevent getting an error.

I saw that mistake when our colleagues copied those lines to use. But finally, if you think it's not so good, I will revert.

@ali-master
Copy link
Author

Any news?

@tofumatt
Copy link
Member

As those aren't code comments, I'd prefer they be outside the code. Generally only code inside code blocks should be treated as being able to be copied 😄

@ali-master
Copy link
Author

I've uncommented that line. Check it again, please

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.

None yet

2 participants