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

Explicit resource management (using keyword) #20

Open
pmcelhaney opened this issue May 30, 2024 · 0 comments
Open

Explicit resource management (using keyword) #20

pmcelhaney opened this issue May 30, 2024 · 0 comments

Comments

@pmcelhaney
Copy link
Owner

https://github.com/tc39/proposal-explicit-resource-management

The ultimate goal is to support the using keyword.

import {temporaryFiles} from "using-temporary-files";

const api = using temporaryFiles();

// api.add(...)
// api.path(...)
// etc. 

It won't take much effort to implement. I just haven't gotten around to it yet.

The existing promise-based API will remain.

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

No branches or pull requests

1 participant