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

Use for-await in examples and manual #3217

Merged
merged 3 commits into from
Oct 28, 2019
Merged

Use for-await in examples and manual #3217

merged 3 commits into from
Oct 28, 2019

Conversation

hayd
Copy link
Contributor

@hayd hayd commented Oct 27, 2019

follow up to #3212, see also #3216.

There's still a top-level for-await in the website home page, but this should be fixed after 0.22 (once this syntax is released).

https://github.com/denoland/deno_website2/blob/92a20e81c51c051080311c2edefe517049dbafcd/src/Home.js#L7-L15

const url = Deno.args[1];
const res = await fetch(url);
const url_ = Deno.args[1];
const res = await fetch(url_);
Copy link
Member

Choose a reason for hiding this comment

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

Why this change?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah. This is currently an error

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Which is to say, with url it didn't compile. #2888

This was one file I didn't actually verify (thought it was a sure thing).

}
console.log(`http://${addr}/`);
for await (const req of server) {
req.respond({ body });
}
Copy link
Member

Choose a reason for hiding this comment

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

Much nicer.

Copy link
Member

@ry ry left a comment

Choose a reason for hiding this comment

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

There's also tools/deno_tcp.ts that could use an update...

@hayd
Copy link
Contributor Author

hayd commented Oct 28, 2019

@ry I pushed updates for tools/deno_tcp.ts. Also made PR for the website: denoland/dotland#87

Copy link
Member

@ry ry left a comment

Choose a reason for hiding this comment

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

LGTM - thanks!

@ry ry merged commit f484776 into denoland:master Oct 28, 2019
@hayd hayd deleted the await-cleanup branch October 28, 2019 20:14
caspervonb pushed a commit to caspervonb/deno_std that referenced this pull request Jan 21, 2021
caspervonb pushed a commit to caspervonb/deno_std that referenced this pull request Jan 24, 2021
caspervonb pushed a commit to caspervonb/deno_std that referenced this pull request Jan 24, 2021
caspervonb pushed a commit to caspervonb/deno_std that referenced this pull request Jan 24, 2021
caspervonb pushed a commit to caspervonb/deno_std that referenced this pull request Jan 31, 2021
caspervonb pushed a commit to caspervonb/deno_std that referenced this pull request Jan 31, 2021
caspervonb pushed a commit to caspervonb/deno_std that referenced this pull request Jan 31, 2021
caspervonb pushed a commit to caspervonb/deno_std that referenced this pull request Jan 31, 2021
caspervonb pushed a commit to caspervonb/deno_std that referenced this pull request Feb 1, 2021
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