-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Conversation
const url = Deno.args[1]; | ||
const res = await fetch(url); | ||
const url_ = Deno.args[1]; | ||
const res = await fetch(url_); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why this change?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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 }); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Much nicer.
There was a problem hiding this 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...
@ry I pushed updates for tools/deno_tcp.ts. Also made PR for the website: denoland/dotland#87 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - thanks!
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