Files
Huáng JùnliàngandGitHub 577b41b198 Rename proposal explicit resource management (#17340)
* rename proposal-explicit-resource-management to transform-explicit-resource-management

* update library description

* bump Babel/core version requirements to ^7.23.9

* add deprecation reminder

* remove outdated reminders

* update reminder date
2025-06-02 09:07:07 -04:00

16 lines
376 B
JavaScript

let log = [];
let Symbol$dispose = Symbol.dispose || Symbol.for("Symbol.dispose");
try {
var _usingCtx = babelHelpers.usingCtx();
const foo = _usingCtx.u(babelHelpers.setFunctionName(class {
static [Symbol$dispose]() {
log.push(`${foo.name} is disposed`);
}
}, "foo"));
log.push(foo.name);
} catch (_) {
_usingCtx.e = _;
} finally {
_usingCtx.d();
}