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

ECMAScript Explicit Resource Management & using Declarations #52955

Closed
DanielRosenwasser opened this issue Feb 24, 2023 · 4 comments · Fixed by #54505
Closed

ECMAScript Explicit Resource Management & using Declarations #52955

DanielRosenwasser opened this issue Feb 24, 2023 · 4 comments · Fixed by #54505
Assignees
Labels
Committed The team has roadmapped this issue ES Next New featurers for ECMAScript (a.k.a. ESNext) Fix Available A PR has been opened for this issue Suggestion An idea for TypeScript

Comments

@DanielRosenwasser
Copy link
Member

@rbuckton's proposal for Explicit Resource Management has reached stage 3 in TC39!

As such, it's time for TypeScript to look into its implementation. This proposal carries a few new features that TypeScript should have

We are in a slightly weird spot here since downlevel emit of using is possible, but will require a lib of esnext.

Given that the 5.1 timeframe will be shorter, it would be reasonable for our first stab at this feature to include only support for --target esnext.

Note that since Async Explicit Resource Management has been split off into its own proposal, I'm not suggesting we add it here.

@DanielRosenwasser DanielRosenwasser added Suggestion An idea for TypeScript Committed The team has roadmapped this issue ES Next New featurers for ECMAScript (a.k.a. ESNext) labels Feb 24, 2023
@DanielRosenwasser DanielRosenwasser added this to the TypeScript 5.1.0 milestone Feb 24, 2023
@Kingwl
Copy link
Contributor

Kingwl commented Mar 6, 2023

Does this one accept PRs? Happy to work on this.

@rbuckton
Copy link
Member

rbuckton commented Mar 6, 2023

I have already started this effort, but thanks for the interest!

@rbuckton
Copy link
Member

rbuckton commented Mar 6, 2023

I'm hoping we shouldn't have the same kind of conflict in the future given that DisposableStack is the name of built-in class related to this feature. You generally don't perform other operations generically on a disposable like you do for iterators.

@MadProbe
Copy link

https://github.com/tc39/proposal-async-explicit-resource-management is stage 3 (see tc39/proposals) and it's planned to merge it back with sync version of proposal so could you update this issue and 5.1 iteration plan?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Committed The team has roadmapped this issue ES Next New featurers for ECMAScript (a.k.a. ESNext) Fix Available A PR has been opened for this issue Suggestion An idea for TypeScript
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants