Skip to content

Update api.md - #992

Open
ali-master wants to merge 2 commits into
localForage:masterfrom
ali-master:patch-1
Open

Update api.md#992
ali-master wants to merge 2 commits into
localForage:masterfrom
ali-master:patch-1

Conversation

@ali-master

Copy link
Copy Markdown

Minor improvement in API doc

minor improvement in api doc

@tofumatt tofumatt left a comment

Copy link
Copy Markdown
Member

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 馃槃

Comment thread docs/api.md Outdated
@ali-master

Copy link
Copy Markdown
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
Copy Markdown
Author

Any news?

@tofumatt

Copy link
Copy Markdown
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
Copy Markdown
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.

2 participants