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

Support using statement for Disposable #134

Merged
merged 6 commits into from
Dec 29, 2023
Merged

Support using statement for Disposable #134

merged 6 commits into from
Dec 29, 2023

Conversation

justjake
Copy link
Owner

@justjake justjake commented Dec 29, 2023

This PR adds support for the using statement on all disposable classes. It is a breaking change because the Disposable interface now requires the [Symbol.dispose] method, so existing implementers will have a type error.

The using statement is a Stage 3 (as of 2023-12-29) proposal for Javascript that declares a constant variable and automatically calls the [Symbol.dispose]() method of an object when it goes out of scope. Read more in this Typescript release announcement.

@justjake justjake enabled auto-merge (squash) December 29, 2023 19:40
@justjake justjake merged commit 1758926 into main Dec 29, 2023
1 check passed
@justjake justjake deleted the jake--using-dispose branch December 29, 2023 19:49
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.

1 participant