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

feat(node_compat): Add a close method to the FileHandle class. #19357

Merged
merged 4 commits into from Jun 5, 2023

Conversation

k-nasa
Copy link
Contributor

@k-nasa k-nasa commented Jun 4, 2023

WHY

ref: #19165

The FileHandle class has many missing methods compared to node.
Add these.

WHAT

  • Add close method

@k-nasa k-nasa marked this pull request as ready for review June 4, 2023 07:36
Co-authored-by: Matt Mastracci <matthew@mastracci.com>

close(): Promise<void> {
// Note that Deno.close is not async
return Promise.resolve(Deno.close(this.fd))
Copy link
Member

Choose a reason for hiding this comment

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

Looks like this just needs a semicolon to pass the linter (run tools/format.js) and we're good to go

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oops..

Copy link
Member

@mmastrac mmastrac 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

@mmastrac mmastrac merged commit d2047f1 into denoland:main Jun 5, 2023
11 checks passed
@k-nasa k-nasa deleted the k-nasa/feat_close_to_filehandle branch June 5, 2023 23:02
@k-nasa
Copy link
Contributor Author

k-nasa commented Jun 5, 2023

Thanks for your review

bartlomieju pushed a commit that referenced this pull request Jun 8, 2023
## WHY 

ref: #19165

The FileHandle class has many missing methods compared to node.
Add these.

## WHAT

- Add close method

---------

Co-authored-by: Matt Mastracci <matthew@mastracci.com>
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.

None yet

2 participants