proposal-explicit-resource-management
proposal-explicit-resource-management copied to clipboard
ECMAScript Explicit Resource Management
It is really great that the README here explains how it would make sense to integrate the disposal protocol into various web standards. Has the conversation with these web API...
Resources which should be disposed of leads to potential room for type checkers (or linters) to help JS developers! I imagine this doesn't escape the author of this proposal, a...
In order to avoid memory leaks, any callback passed to `defer` should be removable.
Opening this issue for discussion and getting feedback, I apologise if this may not be the right place/topic to ask this please feel free to close this if thats the...
In the README, a code snippet uses the "stream" variable to close the stream, but it is defined as "handle". This PR renames the "handle" variable to "stream". ```ts async...
As discussed in #231 and #229, this explores the possibility of reintroducing bound getters for `DisposableStack.prototype.dispose`/`AsyncDisposableStack.prototype.disposeAsync`. By making these methods getters, a `DisposableStack`/`AsyncDisposableStack` subclass that wishes to override disposal needs...
Consider code like: ```ts class NotifyingStack extends DisposableStack { dispose() { const wasDisposed = this.disposed; super.dispose(); if (!wasDisposed) { notify(); } } } ``` By my reading of https://tc39.es/proposal-explicit-resource-management/#sec-disposablestack.prototype-@@dispose this...
Now that #219 has been approved, we need to ensure that we have adequate test coverage in test262
I believe this is the latest spec'd behavior. No options object, and so cause is undefined. https://arai-a.github.io/ecma262-compare/snapshot.html?pr=3000#sec-suppressederror-constructor
A variable reference in the `await using` examples has incorrect capitalization. ```js const asyncRes = { [Symbol.asyncDispose]() {} }; .. await using x = asyncres; ``` This patch aligns the...