mirror of
https://github.com/denoland/deno.git
synced 2025-03-03 09:31:22 -05:00
Fix async-await syntax
This commit is contained in:
parent
fab4bdf40d
commit
52d415537b
1 changed files with 1 additions and 1 deletions
|
@ -9,7 +9,7 @@ API and Feature requests should be submitted as PRs to this document.
|
|||
Example, non-final API for piping a socket to stdout:
|
||||
|
||||
```javascript
|
||||
function nonblockingpipe(fd) {
|
||||
async function nonblockingpipe(fd) {
|
||||
let buf = new Uint8Array(1024); // Fixed 1k buffer.
|
||||
for (;;) {
|
||||
let code = await deno.pollNB(fd, deno.POLL_RD | deno.POLL_WR);
|
||||
|
|
Loading…
Add table
Reference in a new issue