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

doc: improve fs code example quality #46948

Closed
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: add missing optional chaining operator
  • Loading branch information
jakecastelli committed Mar 4, 2023
commit 7ba550021878e9d65355b01f5c36bbd799f38c54
6 changes: 3 additions & 3 deletions doc/api/fs.md
Original file line number Diff line number Diff line change
Expand Up @@ -7638,7 +7638,7 @@ try {
fd = await open('/open/some/file.txt', 'r');
// Do something with the file
} finally {
await fd.close();
await fd?.close();
}
```

Expand All @@ -7652,7 +7652,7 @@ try {
fd = await open('file.txt', 'r');
// Do something with the file
} finally {
await fd.close();
await fd?.close();
}
```

Expand Down Expand Up @@ -7767,7 +7767,7 @@ try {
fd = await open(Buffer.from('/open/some/file.txt'), 'r');
// Do something with the file
} finally {
await fd.close();
await fd?.close();
}
```

Expand Down