Replies: 1 comment
-
@nikeee Thanks for raising this, it sounds great. PR welcome! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
AsyncDisposable
is a new interface defined like that:If a class implements AsyncDisposable, it can be used with
using
. It automatically disposes the resource if the scope exits, even if there was an exception:If the user doesn't use
await using
, everything behaves like it always had. So this wouldn't be a breaking change, justoffering the ability to guarantee stopping the container.
TC39 spec, TS support
Beta Was this translation helpful? Give feedback.
All reactions